aws-toolkit-azure-devops icon indicating copy to clipboard operation
aws-toolkit-azure-devops copied to clipboard

AWSShellScript doesn't work in China even when regionName is specified.

Open st33v opened this issue 3 years ago • 2 comments

Describe the bug

To reproduce

I'm using an AWS Service connection in AzDO to run an AWSShellScript task like this:

        steps:
        - task: AWSShellScript@1
          displayName: "Install Secret"
          inputs:
            awsCredentials: ${{ variables.awsCredentials }}
            regionName: ${{ variables.region }}
            scriptType: "inline"
            inlineScript: |
              echo $AWS_REGION

and I get

InvalidClientTokenId: The security token included in the request is invalid.

Expected behavior

I'd expect the task to honor and work with the regionName set to cn-north-1 or another China region, but it only seems to work if I add an AWS_REGION environment variable.

          env:
            AWS_REGION: ${{ variables.region }}

Screenshots

Your Environment

  • On-prem or cloud based?: cloud
  • Azure DevOps version: cloud
  • AWS Toolkit for Azure DevOps version: 1.13.0

st33v avatar Oct 03 '22 22:10 st33v

but it only seems to work if I add an AWS_REGION environment variable.

Interesting. I think this is a bug with the JS AWS SDK v2 we use.

JadenSimon avatar Oct 24 '22 16:10 JadenSimon