You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aws iam create-role \
--role-name AgentCoreDBOpsRole \
--assume-role-policy-document file://templates/agentcore-trust-policy.json
aws iam put-role-policy \
--role-name AgentCoreDBOpsRole \
--policy-name AgentCoreDBOpsPolicy \
--policy-document file://templates/agentcore-policy.json
aws iam attach-role-policy \
--role-name AgentCoreDBOpsRole \
--policy-arn arn:aws:iam::aws:policy/service-role/AWSAppRunnerServicePolicyForECRAccess
export AGENTCORE_ROLE_ARN=$(aws iam get-role --role-name AgentCoreDBOpsRole --query 'Role.Arn' --output text)
2. Operator Role
The permissions needed on the machine where you run deployment/agentcore/deploy.sh and agentcore invoke. Attach operator-policy.json to your IAM user, role, or instance profile.
# For an IAM user
aws iam put-user-policy \
--user-name your-username \
--policy-name DBOpsOperatorPolicy \
--policy-document file://templates/operator-policy.json
# For an EC2 instance role
aws iam put-role-policy \
--role-name your-instance-role \
--policy-name DBOpsOperatorPolicy \
--policy-document file://templates/operator-policy.json
Files
File
Description
agentcore-role.yaml
CloudFormation — creates the AgentCore execution role + inline policy
agentcore-trust-policy.json
Trust policy — allows bedrock-agentcore.amazonaws.com to assume the role
agentcore-policy.json
AgentCore execution policy — what agents can do (Bedrock, RDS, CloudWatch, etc.)
operator-policy.json
Operator policy — what you need to deploy and invoke agents