aws / aws/aws-toolkit-azure-devops

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

Open
#486 2 comments 2 reactions 0 assignees View on GitHub
auth bug
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

**To reproduce**

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

```yaml
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.

```yaml
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

Contributor guide

Open the contributing guide

Research direction

Start by locating the AWSShellScript@1 implementation and the code that maps regionName into the task environment. Reproduce the YAML example with cn-north-1 and compare it with the AWS_REGION workaround. Done means the task honors regionName for China regions without requiring an extra environment variable.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, typescript
Domain
cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.