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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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

Bitbucket Pipe for aws-cli v2 with OIDC

Hi All


Does there exist a somewhat generic Bitbucket Pipe that wraps the AWS CLI v2 command and includes the OIDC authentication options?


We've used some of the other pre-baked AWS Pipes such as "atlassian/aws-s3-deploy" which have the OIDC authentication stuff baked in and works quite nicely.


However when other AWS CLI commands are needed in automation, we've had to create some custom script to handle the OIDC_TOKEN and call sts assume-role-with-web-identity to get authenticated and then go ahead and run the desired aws cli command.

1 answer

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 05, 2023

@James Pinkster hi. 

Does there exist a somewhat generic Bitbucket Pipe that wraps the AWS CLI v2 command and includes the OIDC authentication options? -- I think the answer is no.

Pipes are the small wrappers, that's allow you to automate some common works, but not the full support like boto3 package for aws cli.

Full list of aws pipes you could find here: Bitbucket AWS pipes .

Also maybe this article will help you.
Here amazon/aws-cli docker image is used.

image: amazon/aws-cli
- step:
oidc: true
- export AWS_REGION=us-west-2
- export AWS_ROLE_ARN=arn:aws:iam::XXXXXXXXXXXX:role/oidc-demo
- export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token
- echo $BITBUCKET_STEP_OIDC_TOKEN > $(pwd)/web-identity-token
- aws s3 cp s3://bucket/XXXXXX ./XXXXXXX

 Regards, Igor

The snippet demonstrating the use of the "amazon/aws-cli" image with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable is what I was looking for. I must have missed this when I originally read the docs.


Thanks, James

Like Igor Stoyanov likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events