Fix STS Signature does not match non us-east-1#194
Merged
suraj-simha merged 6 commits intoJul 20, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses AWS STS SignatureDoesNotMatch failures when Vault and the Lambda function are in different regions by changing the IAM auth payload signing behavior to default to the global STS endpoint (sts.amazonaws.com) and us-east-1 signing region.
Changes:
- Default IAM auth payload signing to the global STS endpoint and
us-east-1signing region unless a custom STS endpoint is configured. - Remove prior behavior that adjusted the assumed-role AWS config region based on
STSEndpointRegion. - Add/adjust unit tests to assert the new default signing behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| internal/vault/client.go | Updates IAM auth payload signing to prefer global STS endpoint/us-east-1, and adjusts endpoint/region selection logic. |
| internal/vault/client_test.go | Adds a new test for the global endpoint default path and updates an existing assertion to expect us-east-1 signing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bcsamrudh
marked this pull request as ready for review
July 3, 2026 04:52
stuti-sr
reviewed
Jul 8, 2026
stuti-sr
reviewed
Jul 8, 2026
stuti-sr
reviewed
Jul 8, 2026
arjunkshashicorp
requested changes
Jul 8, 2026
stuti-sr
reviewed
Jul 15, 2026
stuti-sr
reviewed
Jul 15, 2026
stuti-sr
reviewed
Jul 15, 2026
stuti-sr
reviewed
Jul 15, 2026
bcsamrudh
force-pushed
the
fix-sts-signature-does-not-match-non-us-east-1
branch
from
July 15, 2026 08:51
563ac5d to
140a962
Compare
stuti-sr
previously approved these changes
Jul 16, 2026
Balaji2198
reviewed
Jul 20, 2026
Balaji2198
left a comment
Member
There was a problem hiding this comment.
Thanks for working on this. Provided few comments.
suraj-simha
dismissed stale reviews from santoshhashicorp, stuti-sr, and arjunkshashicorp
via
July 20, 2026 06:48
070c3c9
Balaji2198
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: https://hashicorp.atlassian.net/browse/VAULT-46705
Description:
Lambda function using vault-lambda-extension with AWS SDK V2 crashes when vault and lambda function are in a region other than
us-east-1and also if vault and lambda function are in different regions.Testing Evidence:
Note :
use_sts_region_from_client=falsei.eVAULT_STS_ENDPOINT_REGIONis not usedCase 1 : Vault and lambda in different region :
Vault is running in
ap-southeast-1and Lambda Function is inap-southeast-2Creating Vault server in

ap-southeast-1and lambda function inap-southeast-2via terraform:Result of lambda invoke:

This case was also tested using HCP where Vault cluster was in
us-west-2and lambda function inap-south-1Case 2: Both vault and lambda in same region other than us-east-1:
Both the Vault and Lambda Function are in
eu-central-1Creating Vault server and Lambda in

eu-central-1via terraformResult of Lambda invoke
