Skip to content

feat: add region support to web_identity provider#97

Open
SuddenGunter wants to merge 1 commit into
aws-beam:masterfrom
SuddenGunter:feature/web-identity-region-support
Open

feat: add region support to web_identity provider#97
SuddenGunter wants to merge 1 commit into
aws-beam:masterfrom
SuddenGunter:feature/web-identity-region-support

Conversation

@SuddenGunter
Copy link
Copy Markdown

The web_identity provider now checks AWS_REGION and AWS_DEFAULT_REGION environment variables and includes region in the credentials map when present.

This fixes compatibility with EKS IRSA environments where region is set but not included in STS AssumeRoleWithWebIdentity responses.

  • Check AWS_REGION first, then AWS_DEFAULT_REGION (AWS SDK standard - essentially copied this approach from aws-sdk-go-v2)
  • Backward compatible: returns credentials without region if env vars not set
  • Add tests for region handling and precedence
  • Update README with region configuration documentation

Tested this feature branch in my app that uses aws_credentials - works fine with it :)

Disclaimer: AI was used for this PR

The web_identity provider now checks AWS_REGION and AWS_DEFAULT_REGION
environment variables and includes region in the credentials map when present.

This fixes compatibility with EKS IRSA environments where region is set
but not included in STS AssumeRoleWithWebIdentity responses.

- Check AWS_REGION first, then AWS_DEFAULT_REGION (AWS SDK standard)
- Backward compatible: returns credentials without region if env vars not set
- Add tests for region handling and precedence
- Update README with region configuration documentation

Fixes compatibility for applications that require region in credentials map.
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

Successfully merging this pull request may close these issues.

1 participant