Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when execute CLI actions using eu-south-2 region #510

Open
xente opened this issue Mar 17, 2023 · 2 comments
Open

Error when execute CLI actions using eu-south-2 region #510

xente opened this issue Mar 17, 2023 · 2 comments

Comments

@xente
Copy link

xente commented Mar 17, 2023

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

  1. Go to the pipeline
  2. Create AWS CLI tasks
  3. 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

  1. Go to the pipeline
  2. Create AWS CLI tasks
  3. 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.

@cesirx
Copy link

cesirx commented Aug 11, 2024

@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

@giordanocardillo
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants