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.