Claude Code’s native --cloud sessions cannot use Amazon Bedrock: Anthropic requires an Anthropic account for that feature. Developers who need a Bedrock-backed workflow can instead deploy AWS’s separate sample, which runs tasks in Amazon Bedrock AgentCore Runtime and returns GitHub pull requests for people to review. Anthropic’s Claude Code documentation describes the native feature; AWS’s AgentCore tutorial describes the custom deployment.
| Approach | Provider and account | How tasks run |
Claude Code --cloud | Requires an Anthropic account; unavailable when Claude Code is configured for Amazon Bedrock. | Uses Claude Code’s native cloud-session feature. |
| AWS AgentCore sample | Uses Amazon Bedrock in the deploying AWS account. | A custom AWS deployment runs each task in an AgentCore Runtime session; submit work through a Claude Code plugin with a local MCP server or through a web console. |
Treat the pull request as the handoff point: the agent can propose a code change, but a person reviews and merges it.
How the AWS sample turns a task into a pull request
AWS describes a control plane built from API Gateway, Lambda, DynamoDB, and SQS. A task is dispatched to its own AgentCore Runtime session and microVM, with isolated CPU, memory, and filesystem. In the sample workflow, Claude Opus plans and reviews, Claude Sonnet writes code, and the repository’s setup and test commands run before review.
Review can send a task back to planning, up to three attempts in total. The agent opens a GitHub pull request but does not merge it. If verification passes, the pull request is opened as a regular request; otherwise it is a draft. A person remains responsible for reviewing the change and deciding whether to merge.
What you need before deployment
AWS’s tutorial requires:
- An AWS account and CLI credentials.
- Docker running locally.
- Python 3.11 or later,
uv, and Node.js 22.12 or later. - A trusted GitHub repository with setup and test commands the agent can run.
AWS says this sample is not suitable for untrusted repositories, because the agent runs repository-defined commands, or open-ended work, because the task loop stops after three attempts. The Claude Code plugin is optional if you submit tasks through the web console; terminal submission requires plugin marketplace support.
For its AgentCore Runtime V2 tutorial, AWS lists us-east-1, us-east-2, us-west-2, ap-northeast-1, and eu-west-1; the walkthrough uses us-west-2.
Deploy and connect a repository
- Choose a trusted repository. Make sure it has setup and test commands suitable for the coding task. Those commands run as part of the sample’s workflow.
- Prepare the local tools and AWS credentials. Install the prerequisites above and use the AWS CLI credentials for the account where you plan to deploy.
- Run the sample’s preflight checks, then deploy it. Follow AWS’s deployment instructions for the selected Region. AWS estimates deployment at 15–25 minutes; that is its stated estimate.
- Install and authorize the GitHub App. The app’s installation controls which repositories it can access. AWS says AgentCore Identity provides a user-to-server token that expires after eight hours and refreshes automatically.
- Register the repository after connecting GitHub. AWS estimates repository registration takes another 8–12 minutes.
Submit work and review the result
Send a scoped task through the web console or the Claude Code plugin. The sample runs the task in its AgentCore session, executes the repository’s setup and test commands, then reviews the result. The task loop can make up to three attempts before it opens a pull request for a person to inspect and merge.
A passed verification changes the pull request from draft to regular status; it does not remove the human review step. Check the proposed changes and test results before deciding what to merge.
Security boundaries and ongoing charges
AWS describes the task sessions as isolated microVMs in private subnets, with private VPC endpoints for AWS services. The workflow still uses a NAT gateway for outbound HTTPS to GitHub and package registries. Its DNS Firewall blocks selected domains; it is a denylist, not a general allowlist for HTTPS traffic.
The prompt guardrail screens the task submitted for processing. AWS says it does not screen repository files or command output read during a run. That leaves repository-originated instructions outside this particular screening step, so repository trust and human review remain important parts of the workflow.
The sample continues to incur infrastructure charges while idle, including charges associated with the NAT gateway, interface endpoints, AWS WAF, the Cognito user pool, DNS Firewall, images, and logs. Its default Amazon Bedrock budget alert is $200 per month and emails the account holder; it does not cap spending.
Remove the deployment
Clean up in dependency order: deregister repositories, disconnect GitHub, destroy the deployed stacks, and then delete the GitHub App. AWS notes that some retained resources require separate deletion before their charges stop.