Runtime.launch() BUG

Aperta
#203 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
aws, python
Ambito
backend, cloud

Direzione di ricerca

Start with 01-tutorials/03-Deployment/03-agentcore-deployment/deploy-agent.ipynb and trace how prod_runtime.launch() creates or selects the AgentCore execution role. Check the role's ECR permissions against the reported ecr:GetAuthorizationToken, ecr:BatchGetImage, and ecr:GetDownloadUrlForLayer requirements. Done when deployment succeeds with the execution role able to access the built image.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I am using in stands samples, 01-tutorials/03-Deployment/03-agentcore-deployment/deploy-agent.ipynb

prod_launch = prod_runtime.launch() is failing

runtime.launch() is creating dynamically to IAM role

  • AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-xyz for the building phase
  • AmazonBedrockAgentCoreSDKRuntime-us-west-2-xyz for the deployment phase

it appears these role dont have sufficient permissions, in particular AmazonBedrockAgentCoreSDKRuntime is empty !

Execution role available: arn:aws:iam::019251741487:role/AmazonBedrockAgentCoreSDKRuntime-us-west-2-1a0633a512
Preparing CodeBuild project and uploading source...
Getting or creating CodeBuild execution role for agent: strands_restaurant_agent
Role name: AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-1a0633a512
CodeBuild role doesn't exist, creating new role: AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-1a0633a512
Creating IAM role: AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-1a0633a512
✓ Role created: arn:aws:iam::019251741487:role/AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-1a0633a512
Attaching inline policy: CodeBuildExecutionPolicy to role: AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-1a0633a512
✓ Policy attached: CodeBuildExecutionPolicy
Waiting for IAM role propagation...
CodeBuild execution role creation complete: arn:aws:iam::019251741487:role/AmazonBedrockAgentCoreSDKCodeBuild-us-west-2-1a0633a512
Using dockerignore.template with 46 patterns for zip filtering
Uploaded source to S3: strands_restaurant_agent/source.zip
Created CodeBuild project: bedrock-agentcore-strands_restaurant_agent-builder
Starting CodeBuild build (this may take several minutes)...
Starting CodeBuild monitoring...
🔄 QUEUED started (total: 0s)
✅ QUEUED completed in 1.0s
🔄 PROVISIONING started (total: 1s)
✅ PROVISIONING completed in 8.2s
🔄 DOWNLOAD_SOURCE started (total: 9s)
✅ DOWNLOAD_SOURCE completed in 2.1s
🔄 BUILD started (total: 11s)
✅ BUILD completed in 16.5s
🔄 POST_BUILD started (total: 28s)
✅ POST_BUILD completed in 10.3s
🔄 COMPLETED started (total: 38s)
✅ COMPLETED completed in 1.0s
🎉 CodeBuild completed successfully in 0m 39s
CodeBuild completed successfully
CodeBuild project configuration saved
Deploying to Bedrock AgentCore...

ValidationException: An error occurred (ValidationException) when calling the CreateAgentRuntime operation: Access denied while validating ECR URI '019251741487.dkr.ecr.us-west-2.amazonaws.com/bedrock-agentcore-strands_restaurant_agent:latest'. The execution role requires permissions for ecr:GetAuthorizationToken, ecr:BatchGetImage, and ecr:GetDownloadUrlForLayer operations.

Lingua principale
Python
Stelle
897
Fork
450
Merge medio
1g 9h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di strands-agents/samples

Tutte le issue di strands-agents/samples

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.