Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to delete S3 object using bamboo plan/script to delete S3 object using bamboo


I want to delete S3 files from the bucket by creating a bamboo plan/script which when run will delete the file.

I tried creating a plan and then creating a task. But in the task i can see no option for Amazon S3 Object in the list. I have refered to the below url and followed the steps:

Is there any other way i can create a bamboo plan and delete files from S3???


Hi @BeingDarsh,

Welcome to the Atlassian Community!

If I understand you correctly, you are unable to see the Amazon S3 Object task in the dialog when you try to Create a task for a job in Bamboo?

This task is part of the (commercial) Tasks for AWS (Bamboo) app, which you can install from the Atlassian Marketplace. As with all apps, you can always evaluate it first by clicking the yellow Try it free button in the top right of the Marketplace listing.

  • Disclaimer: I'm a co-founder of this app's vendor Utoolity.


If you would rather not use a dedicated task for S3, you could also use the AWS CLI's high level S3 commands via the built-in Bamboo Script task, for example aws.s3.rm covers your use case.

Please note that this usually requires an AWS Access Key, which violates the AWS security best practice to not store and expose long-term credentials in insecure environments. You could address this by using our Identity Federation for AWS (Bamboo) app to provide temporary AWS credentials at runtime, as outlined in How to provide temporary AWS credentials to the AWS Command Line Interface (AWS CLI) via Bamboo variables.

  • While this app is also a commercial offering, it has a lower price point than Tasks for AWS (where it's also included for free btw.).


Like # people like this

Hi Steffen,

Thanks for your revert.

I have tried the steps which you had provided.

I have created a plan, then i created a task wherein i have added task by selecting type as Script. And then followed the steps given in

In the script i have written command as attached in screenshot "Bamboo_Task.PNG".

But when i run the plan i get error as below:

(line 2: $: command not found).



Also i have set the variables under the variables tab and also i have added a local agent under requirement tab but it gives an error when clicked on the Defalut Job as "No agents meet this job's requirements."

Can you please check and correct me where i am wrong?

There seem to be two different issues eventually:

1. Missing AWS CLI

But when i run the plan i get error as below:

(line 2: $: command not found).

The missing command here is 'aws', which is the AWS Command Line Interface (AWS CLI) and may need to be installed on your agent first.

I think all Bamboo stock images for Elastic Bamboo have it installed by default meanwhile, but if you are using a custom image, or a remote or local agent, you may need to install it yourself - please refer to Installing the AWS CLI for instructions.

2. Missing job requirements

The "No agents meet this job's requirements" error usually needs to be taken literally. What do you mean exact when you say that you have "added a local agent under requirement tab", and can you show me the "Required capability" list from the requirements tab so that we can analyze which requirement is not met?

Like BeingDarsh likes this

Hi Steffen,

Thank you so much for your help :-)

I managed to run the plan successfully.

There were some minor mistakes which i had made after correcting it worked.

Like Steffen Opel _Utoolity_ likes this


Log in or Sign up to comment
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

952 views 3 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you