Intermittent InvalidSignatureException
/SignatureDoesNotMatch
errors using current SDK client versions
#4689
Labels
bug
This issue is a bug.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
p2
This is a standard priority issue
potential-regression
Marking this issue as a potential regression to be checked by team member
response-requested
Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Describe the bug
Our org is still using
aws-sdk
v2 client in the majority of our serverless environments (deployed using Serverless Framework v3), we have identified that some version of the SDK client after version2.1680.0
has introduced intermittentInvalidSignatureException
errors, though we are not sure specifically which version as this is the last known version deployed that doesn't appear to introduce the issue.This has been confirmed by updating a service to use a newer version of the package, deploying a beta release and observing errors intermittently logged, then deploying a followup beta release with only the
aws-sdk
rolled back to2.1680.0
; the error then stops appearing.Regression Issue
Expected Behavior
Requests are processed successfully by Amazon through
aws-sdk
without 4xx errors.Current Behavior
Function calls respond with e.g:
Reproduction Steps
This issue is not consistently reproducible. This applies to all services and not just requests to DynamoDB for example, but a typical request looks something like the below. I have included the
AWS.config.update
we apply globally in case it is relevant:Possible Solution
I suspect that a vulnerabilty in one of the package's dependencies has been patched or other updates made which have not been picked up by testing because the issue is relatively intermittent.
Additional Information/Context
Please note that we have seen this occurring in all our AWS accounts, from development to production, across all deployment regions (we deploy to four main regions:
eu-west-2
,us-east-1
,ca-central-1
,ap-southeast-2
). Our Lambdas are all configured to use the NodeJS v20 runtime. We include theaws-sdk
in deployment packages as recommended (and since the latest runtimes do not bundle v2).We also raised an enterprise support ticket with Amazon Support who after much back and forth suggested that we raise the ticket here on the repo for the team to investigate, including confirming that we use execution roles with permissions and do not provide credentials in the requests, confirming the server time has no clock skew (which was odd to request given this is within Lambda context), etc. All the typical reasons for potential signature mismatch were covered:
We have chosen option 1.
SDK version used
2.1692.0
Environment details (OS name and version, etc.)
AWS Lambda. E.g: Runtime Version nodejs:20.v51 Runtime Version ARN: arn:aws:lambda:eu-west-2::runtime:cb6527bfb6726a080a367eca00e49765ca5abd8cd1a17783fbee683313121ece
The text was updated successfully, but these errors were encountered: