aws / aws/bedrock-agentcore-starter-toolkit
[FEATURE] Add support for custom Docker image tags instead of hardcoded :latest
- Dominant language
- Python
- Stars
- 508
- Forks
- 155
- Avg merge
- 8h 50m
- Merged PRs (30d)
- 4
Description
The current implementation of the Bedrock AgentCore starter kit hardcodes the Docker image tag to `:latest` in the `_deploy_to_bedrock_agentcore` function:
```python
agent_info = bedrock_agentcore_client.create_or_update_agent(
agent_id=agent_config.bedrock_agentcore.agent_id,
agent_name=agent_name,
image_uri=f"{ecr_uri}:latest", # <- Here
# ...
)
```
### Problem
This approach prevents proper version isolation between different AgentCore Runtime endpoints. When multiple endpoints (e.g., staging, production) reference different runtime versions that all point to the same :latest tag, they end up running identical container content despite being on different "versions." This breaks the expected isolation model where endpoints should remain stable until explicitly updated.
### Use Case
AgentCore runtime with 2 custom endpoints, `staging` and `production`. (Plus the pre-configured `DEFAULT`)
1. Production AgentCore endpoint is at version 1.
2. New agent code is deployed using `agentcore launch`. This auto-updates `DEFAULT` to version 2
3. Manual update of `staging` endpoint to version 2 for testing.
4. Currently, although production is set to version 1 - it still runs the new agent code - because all versions resolve `:latest`
Example:
Endpoints:
Version 88:
Version 86:
Contributor guide
Research direction
Start at the `_deploy_to_bedrock_agentcore` function and inspect how `agent_config` and `ecr_uri` are assembled before `create_or_update_agent` is called. Determine how a custom tag should be supplied and verify the completed behavior with separate staging and production endpoint versions so each remains pinned to its intended image content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, python
- Domain
- cloud, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100