Skip to content

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

Open
@st33v

Description

@st33v

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    authbugWe can reproduce the issue and confirmed it is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions