Skip to content

Community contribution: finale AgentCore region and permissions fix - #163

Open
prodm93 wants to merge 1 commit into
ed-donner:mainfrom
prodm93:finale-agentcore-region-permissions-fix
Open

Community contribution: finale AgentCore region and permissions fix#163
prodm93 wants to merge 1 commit into
ed-donner:mainfrom
prodm93:finale-agentcore-region-permissions-fix

Conversation

@prodm93

@prodm93 prodm93 commented Jul 26, 2026

Copy link
Copy Markdown

Summary

The finale project breaks out of the box for anyone whose default AWS region is not us-west-2. The default model (Claude Sonnet 4) has also been sunset, so the course's default Agent() configuration no longer works reliably without explicitly configuring a supported model and inference profile.

This PR adds a community contribution guide that walks through the full fix: deploying in us-west-2, switching to a working model with explicit inference profile IDs, and patching the auto-generated IAM role for code interpreter permissions. It also includes patched first.py and looper.py that work against a current us-west-2 deployment with Nova Pro.

The guide briefly covers open-source model selection to cirucmvent needing to sign a usage agreement for Anthropic models as well: Nova Micro is not reliable enough for multi-step tool use and emits literal <thinking> tags into output; LLaMA models are incompatible with streaming entirely. Nova Pro is the recommended alternative.

Files changed

  • community_contributions/finale_agentcore_region_and_permissions_fix.md: step-by-step guide covering region setup, model and inference profile configuration, IAM permissions for code interpreter, model choice notes, and links to relevant AWS and Strands docs
  • finale/first.py: patched with explicit BedrockModel using us.amazon.nova-pro-v1:0 and us-west-2
  • finale/looper.py: same model fix; working execute_python tool with CodeInterpreter("us-west-2")

… for finale

Documents three issues with the finale project when deploying from a non-us-west-2 region:
inference profile ARN mismatch, missing code interpreter IAM permissions, and IAM
execution role vs user permission confusion. Includes patched first.py and looper.py
with explicit model inference profile IDs and region settings.
@ed-donner

Copy link
Copy Markdown
Owner

thank you so much for this! But are you sure I should add those finale/ files?

@prodm93

prodm93 commented Aug 8, 2026

Copy link
Copy Markdown
Author

Hi Ed!

These files contain the actual fixes required to make the finale code run. The original versions rely on Strands’ implicit model and region defaults, which no longer seem to work with the model setup currently available through Bedrock. The changes explicitly select working inference profiles and keep the model, runtime, and Code Interpreter in the same region, preventing the failures described in the PR. Not the prettiest workaround at the IAM permissions resolution level, but it does sort out the issues just fine and keep the project working when it wasn't possible to do with the original finale code/setup.

I did see that the finale generally lets students copy and paste chunks from the README.md to reconstruct the code themselves--were you hoping to have the PR restructured that way rather than have complete files?

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.

2 participants