fix: use AWS_REGION env var instead of hardcoded us-east-1 in dynamo_utils.py - #2009
Open
jyotsnamas wants to merge 1 commit into
Open
fix: use AWS_REGION env var instead of hardcoded us-east-1 in dynamo_utils.py#2009jyotsnamas wants to merge 1 commit into
jyotsnamas wants to merge 1 commit into
Conversation
…utils The FinanceDB class hardcoded us-east-1 as the DynamoDB region, but deploy.py creates the table in the session region (e.g., us-west-2). This causes AccessDeniedException when the deployed agent tries to access the table. Now reads AWS_REGION/AWS_DEFAULT_REGION from env. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
09-mcp-e2e/helpers/dynamo_utils.pywhich hardcodesregion_name="us-east-1"for the DynamoDB clientdeploy.pycreates the DynamoDB table in the session region (e.g., us-west-2), but the runtime agent code connects to us-east-1AccessDeniedExceptionbecause the table doesn't exist in us-east-1Root cause
Verification
Deployed
09-mcp-e2e/01-server-e2eto AgentCore Runtime in us-west-2 (with mcp pinned):tools/call add_transaction→AccessDeniedException(table not in us-east-1)tools/call get_balance→Balance: $-42.50, Total Income: $0.00, Total Expenses: $42.50Test plan
🤖 Generated with Claude Code