When using the interactive terminal UI to create or modify an AgentCore project, selecting a region during agentcore create or updating it via agentcore add correctly displays the selection and passes it to the deployment. However, if the user manually edits agentcore/agentcore.json to change the region field and then runs agentcore deploy, the deployment uses the hardcoded default region instead of the updated value from the config file.
Steps to reproduce
- Create a new project:
agentcore create (select region us-west-2)
- Verify region is set correctly in
agentcore/agentcore.json
- Manually edit
agentcore/agentcore.json and change region to eu-west-1
- Run
agentcore deploy
- Observe: deployment proceeds using us-west-2 instead of eu-west-1
Expected behavior
The deploy command should read the region value from agentcore.json and use it for infrastructure deployment, respecting manual edits to the config file.
Actual behavior
The region from the config file is ignored. The CLI either uses a hardcoded default or falls back to the initially selected region, making it impossible to update the deployment region without recreating the project.
Why this matters
Users may need to migrate agents between regions for compliance, latency, or cost reasons. The config file should be the source of truth for deployment parameters. If the file is updated, subsequent deployments must honor those changes.
Related
See #341 which mentions the same config persistence issue with region updates.
Contributed by Klement Gunndu
When using the interactive terminal UI to create or modify an AgentCore project, selecting a region during
agentcore createor updating it viaagentcore addcorrectly displays the selection and passes it to the deployment. However, if the user manually editsagentcore/agentcore.jsonto change the region field and then runsagentcore deploy, the deployment uses the hardcoded default region instead of the updated value from the config file.Steps to reproduce
agentcore create(select region us-west-2)agentcore/agentcore.jsonagentcore/agentcore.jsonand change region to eu-west-1agentcore deployExpected behavior
The deploy command should read the region value from
agentcore.jsonand use it for infrastructure deployment, respecting manual edits to the config file.Actual behavior
The region from the config file is ignored. The CLI either uses a hardcoded default or falls back to the initially selected region, making it impossible to update the deployment region without recreating the project.
Why this matters
Users may need to migrate agents between regions for compliance, latency, or cost reasons. The config file should be the source of truth for deployment parameters. If the file is updated, subsequent deployments must honor those changes.
Related
See #341 which mentions the same config persistence issue with region updates.
Contributed by Klement Gunndu