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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,458,747
Community Members
 
Community Events
176
Community Groups

How can i execute aws sts assume-role --role-arn command from bitbucket pipeline?.

i am trying to execute below command from bitbucket pipeline. its throwing error to execute aws configure command.

I am looking to read AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY from assume role .

The below command working file in mine local command prompt.

- CRED =$(AWS STS assume-role --ROLE-ARN ARN:AWS:IAM::xxxx:role/assume-role --role-session-name "RoleSession1" --query 'Credentials.[AccessKeyId,SecretAccessKey,SessionToken]' --output text)

- export AWS_ACCESS_KEY_ID=${CRED[1]}
- export AWS_SECRET_ACCESS_KEY=${CRED[2]}
- export AWS_SESSION_TOKEN=${CRED[3]}

Below error in pipeline while executing above commands-

How can i execute above commands from bitbucket pipeline.

1 answer

0 votes
Norbert C Atlassian Team Feb 13, 2022

Hi Manish,

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Welcome to the Atlassian Community!

You mentioned that: "Below error in pipeline while executing above commands"

Can you please share with us, what's the error you receive in Pipelines while you execute the command? That'll help us troubleshooting your issue.

We're looking forward to hear from you.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events