Repository navigation
test: compare start-lambda errors by code and message - #9455
Merged
Merged
Conversation
botocore 1.44 defaults to the standard retry mode. With the test client's max_attempts of 0, a failed call now sets MaxAttemptsReached, and ClientError adds " (reached max retries: 0)" to its string. The start-lambda error tests compared str(ClientError) exactly, so they failed after the boto3 bump to 1.44.5. Compare the Code and Message of the error response instead. These are what the local Lambda service returns and do not depend on how botocore formats the exception.
🧪 Hands-on test: No problems observed in 4 scenariosCommit Scenarios
Runner's notes in full
🤖 Automated hands-on test — not a review approval · model claude-opus-5.5 · Kiro kiro-cli 2.33.1 · build History (1)
|
ckawl
approved these changes
Nov 20, 2026
vicheey
approved these changes
Nov 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.
Which issue(s) does this change fix?
N/A. Fixes the
local-start-lambdaintegration test failures ondevelopafter the boto3 bump to 1.44.5 (https://github.com/aws/aws-sam-cli/actions/runs/44637882278).Why is this change necessary?
botocore 1.44 defaults to the
standardretry mode. The start-lambda test client setsmax_attemptsto 0, so a failed call now setsMaxAttemptsReached, andClientErroradds(reached max retries: 0)to its string:The error-case tests compared
str(ClientError)exactly, so 10 of them failed.How does it address the issue?
The tests now compare
response["Error"]["Code"]andresponse["Error"]["Message"]instead of the exception string. These are what the local Lambda service returns, so the tests no longer depend on how botocore formats the exception. The expected codes and messages are unchanged.What side effects does this change have?
None. Test-only change.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.