feat: AgentCore Instances compute type (x86_64) for managed environments - #468
Open
matheus-1618 wants to merge 14 commits into
Open
matheus-1618 wants to merge 14 commits into
matheus-1618 wants to merge 14 commits into
Conversation
Managed environments can now target the AgentCore Instances compute type
(compute: { type: 'instances', architecture: 'x86_64' | 'arm64' }):
- capacity provider per architecture, created lazily by the status
lambda with a deterministic name (immutable resource, create-once)
- runtime created with capacityProviderConfiguration; networking is
inherited from the capacity provider and the workspace moves from
managed session storage to a persistent EBS volume at /mnt/workspace
- x86_64 environments build FROM an amd64 variant of the core image
(opt-in terraform build) on an x86 CodeBuild fleet via per-build
overrides; catalog tools stay arm64-only for now
- everything is gated behind enable_instances_compute (default false)
The previous pin referenced the arm64-specific manifest, which silently ignores --platform and blocks amd64 builds of the core image. The index digest resolves to the exact same arm64 manifest on arm builds (no-op) and selects the amd64 manifest when building for x86_64.
Kiro, OpenCode, bun and uv were pinned to arm64 artifacts, which made --platform linux/amd64 builds impossible. Each download now selects the artifact and its pinned sha256 by TARGETARCH; arm64 builds keep the exact same artifacts as before.
Admins choose between serverless microVMs (default, arm64) and EC2 Instances (x86_64) when creating a managed environment. The choice is immutable after creation, matching the AgentCore contract, so the selector only renders on the create flow.
The verification prologue hardcoded the arm64 assertion, rejecting correctly-built x86_64 images. The expected architecture now follows the recipe (docker inspect reports x86_64 as amd64).
…counts In accounts where ECR enhanced scanning is enabled, DescribeImageScanFindings is backed by Amazon Inspector and the status lambda also needs inspector2:ListCoverage/ListFindings, otherwise every image scan fails with an authorization error.
The first CreateCapacityProvider in an account provisions the AWSServiceRoleForBedrockAgentCoreRuntimeInstances service-linked role on behalf of the caller, which requires iam:CreateServiceLinkedRole scoped to that service.
CreateAgentRuntime with a capacityProviderConfiguration authorizes the association through PassCapacityProvider on the capacity provider ARN.
matheus-1618
requested review from
JWThewes,
eipasteur,
jeromevdl,
leandrodamascena and
svozza
as code owners
September 15, 2026 11:26
…device workspace EBS-backed workspace mounts (Instances compute type) come formatted, so /mnt/workspace contains lost+found and git clone refuses the non-empty destination. Remove only the well-known mkfs entries when no checkout exists; any other residue still fails loudly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds opt-in support for the AgentCore Instances compute type to managed environments, including x86_64 environments — the first non-arm64 path in the platform.
Admins creating a managed environment can now choose its compute:
Everything is gated behind a new terraform variable
enable_instances_compute(defaultfalse). Deployments that don't opt in are unaffected — with the flag off there is no amd64 image build, no operator role, and the compute selector rejectsinstances.Why
/mnt/workspace, lifting the fixed 1 GB session-storage ceiling and surviving session stops.How
compute: { type, architecture }field on the environment (API + UI selector on the create flow; immutable after creation, matching the AgentCore contract).capacityProviderConfiguration+capacityProviderVolume(nonetworkConfiguration— Instances inherits the capacity provider's VPC).environmentTypeOverride/imageOverride+ anIMAGE_PLATFORMvariable in the buildspec).--platform), and Kiro/OpenCode/bun/uv select artifact + pinned sha256 byTARGETARCH. arm64 builds resolve to the exact same artifacts as before.Fixes picked up along the way (apply to microVMs deployments too)
inspector2:ListCoverage/ListFindingsfor the status lambda — in accounts with ECR enhanced scanning,DescribeImageScanFindingsis served by Amazon Inspector and every image scan fails without these.iam:CreateServiceLinkedRole(scoped) — the first capacity provider in an account provisions theAWSServiceRoleForBedrockAgentCoreRuntimeInstancesSLR.bedrock-agentcore:PassCapacityProvider— required byCreateAgentRuntimewhen associating a capacity provider.mkfs.ext4leaveslost+foundat the volume root andgit clonerefuses the non-empty destination. The workspace init now clears the well-known filesystem entries before cloning (any other residue still fails loudly).Notes and limitations
Instance type 't3.large' is not supported); the default allowlist usesm6i.large. m5/m6i/c5/c6i were verified to be accepted.Validation
End-to-end on a fresh us-east-1 deployment with
enable_instances_compute = true:compute: { type: instances, architecture: x86_64 }.--platform linux/amd64, image built FROM the amd64 core and passed the (now architecture-aware) verification script.READY), runtime created withcapacityProviderConfigurationand theworkspaceEBS volume at/mnt/workspace.arch=x86_64, non-root, writable workspace, all four agent CLIs installed.linux/amd64andlinux/arm64builds of the core image verified locally (all six CLI binaries at their pinned versions on both).Tests: 122 backend (18 new covering the compute module and the Instances runtime path) and 569 frontend, all passing;
terraform validateclean.