aws-toolkit-azure-devops
aws-toolkit-azure-devops copied to clipboard
Error when execute CLI actions using eu-south-2 region
Describe the bug
I am trying to migrate our infrastructure from France to Spain but when I run the scripts next error appears
An error occurred (AuthFailure) when calling the DescribeRegions operation: AWS was not able to validate the provided access credentials ##[error]Error: The process '/usr/local/bin/aws' failed with exit code 254
Using the same code but with the France region is working fine
To reproduce
Test1
- Go to the pipeline
- Create AWS CLI tasks
- Configure task AWS credentials: My credentials (The region eu-south-2 is enabled in this account) AWS Region selector: eu-south-2 did not appear then we did not populate it Command: ec2 Subcommand: describe-regions Options and parameters: --region eu-south-2
Test2
- Go to the pipeline
- Create AWS CLI tasks
- Configure task AWS credentials: My credentials (The region eu-south-2 is enabled in this account) AWS Region selector: eu-south-2 did not appear then we did not populate it Command: ec2 Subcommand: describe-regions Environment Variables: AWS_REGION=eu-south-2
Expected behavior
Connect to my account and list the describe-regions
Your Environment
- On-prem or cloud-based?: cloud base
- AWS Toolkit for Azure DevOps version: 1.13.0 (Latest)
Additional context
I have executed this command from my laptop with the same credentials using my CLI and it is working fine.
@xente , make sure you make the sts assume-role call using a regional sts endpoint (or else it will use the default/global one and you will get a version 1 token, which is not valid for new regions).
It is all well described here: https://repost.aws/knowledge-center/iam-validate-access-credentials
That's righ and involves every "new" region. Can you add the "sts" endpoint configuration to the service connection to allow usage of AssumeRole on different regions?