Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to set object tags for files uploaded to AWS S3 by the atlassian/aws-s3-deploy pipe?

Imi Barna February 15, 2022

I would like to use the artifacts uploaded to AWS S3 with Terraform. As a security measure Terraform needs a tag on each object as follows: 

Tagging='used-by-tf=True'

I was wondering whether the tagging is possible without implementing a custom s3 upload mechanism.

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 17, 2022

Hi @Imi Barna

Welcome to the community.
As per checking, the Pipe atlassian/aws-s3-deploy is based on the AWS Sync CLI.
I'm afraid the command does not offer a tagging flag that you can use to tag an S3 object.

As a workaround, I do believe it is possible for you to use AWS CLI in your Pipelines step container.
Hence, the best I can suggest is for you to:

  • Upload to AWS S3 bucket using the Pipes script - atlassian/aws-s3-deploy
  • Use an AWS command within your step container (you may need to install this first or use a Docker image that has AWS CLI installed) to add a tag against your S3 object. (e.g put-object-tagging )

Hope it helps and let me know if you have further questions.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events