aws-actions / configure-aws-credentials

Configure AWS credential environment variables for use in other GitHub Actions.
MIT License
2.43k stars 466 forks source link

Incorrect sts endpoint when using region cn-north-1 #1040

Closed jacoy510 closed 5 months ago

jacoy510 commented 5 months ago

Describe the bug

When trying to configure aws credentials in region cn-north-1, receive the below error Error: getaddrinfo ENOTFOUND sts.cn-north.amazonaws.com

Expected Behavior

Based on the official document, the sts endpoint for region cn-north-1 should be sts.cn-north-1.amazonaws.com.cn https://docs.amazonaws.cn/en_us/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html

Current Behavior

Currently when try to configure aws credentials for cn-north-1, it will try to use wrong sts endpoint address sts.cn-north-1.amazonaws.com, which cause the network error

Reproduction Steps

The workflow looks like this:

   steps:
      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v4
        with:
          aws-access-key-id: ${{ inputs.aws_access_key}}
          aws-secret-access-key: ${{ inputs.aws_secret_access_key}}
          role-to-assume: ${{ inputs.role_to_assume }}
          aws-region: cn-north-1

Possible Solution

Probably need do some adaptions for CN region to create the correct sts endpoint address

Additional Information/Context

No response

github-actions[bot] commented 5 months ago

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one.