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
Completes the AgentCore Capacity Provider feature end to end and brings its DevEx to parity with the rest of the CLI.
This PR carries two commits — the revert-of-revert that restores Journey 1, plus a new commit adding Journeys 2–4 and the DevEx polish — so it delivers the full feature:
J1 — create/remove a capacity provider as a first-class project resource (add capacity-provider / remove capacity-provider), persisted to agentcore.json and synthesized to an AWS::BedrockAgentCore::CapacityProvider CloudFormation resource (VPC, launch parameters, named EBS volumes, lifecycle, auto-created operator role), with deploy/status integration. (Restored here via
revert-of-revert; originally feat(capacity-provider): add capacity-provider resource (Journey 1) #2030, reverted in revert: remove capacity-provider Journey 1 #2045 for release timing.)
J2 — attach a runtime to a capacity provider by in-project name or external ARN (add agent --capacity-provider <name-or-arn>), rendered as capacityProviderConfiguration on the runtime (network config
is mutually exclusive and omitted).
J3 — mount capacity-provider volumes into a runtime (--cp-volume-name / --cp-volume-mount-path), routed through the existing filesystem-mount framework.
J4 — capacity-provider delete-session data-plane command to deprovision a live CP session (destructive confirm, --yes, name/id/ARN resolution).
TUI parity: full interactive add capacity-provider wizard (named volumes, EBS encryption + KMS key, instance profile, lifecycle timeouts); capacity-provider attach is now available in the agent create/template flow (and agentcore create) as well as the BYO flow.
DevEx polish: paired --volume-name / --volume-size flags (replacing --volume name:sizeGiB, for consistency with the other paired flags); a referential-integrity guard that blocks removing a capacity
provider still referenced by a runtime; and removal of the [preview] label from the CP add/remove menus.
Bumps @aws-sdk/client-bedrock-agentcore to a version that ships DeleteCapacityProviderSessionCommand.
Related Issue
Closes #
Documentation PR
Type of Change
Bug fix
New feature
Breaking change
Documentation update
Other (please describe):
Testing
How have you tested the change?
I ran npm run test:unit and npm run test:integ
I ran npm run typecheck
I ran npm run lint
If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots
Details:
Unit: full suite green (6219 tests). Added coverage for the paired volume flags, the advanced parity flags (instance-profile / encryption+KMS / lifecycle), the buildCreateAgentConfig mapping, the useGenerateWizard CP flow, the wizard buildSteps sequencing, and a duplicate-menu guard.
Integ: capacity-provider add/remove and add-agent-attach integ tests pass against the real CLI binary.
Typecheck + lint: clean (no new warnings).
Interactive TUI (harness): drove the add capacity-provider wizard (forward + back-navigation, including encrypt→KMS→back→No), the agent create/template CP attach, agentcore create with a CP-by-ARN, and
the BYO CP flow.
Live end-to-end (us-west-2): deployed a template agent on an arm64 capacity provider with a mounted volume → CP + runtime READY, invoke returned a response, delete-session deprovisioned the session,
and teardown removed the stack cleanly.
Checklist
I have read the CONTRIBUTING document
I have added any necessary tests that prove my fix is effective or my feature works
I have updated the documentation accordingly
I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
My changes generate no new warnings
Any dependent changes have been merged and published
⚠️Dependent change / merge order: this PR consumes capacity-provider support from @aws/agentcore-cdk (the L3 constructs), which is a separate PR (feat/capacity-provider-attach in agentcore-l3-cdk-constructs). That L3 PR must merge and publish a new alpha, and the @aws/agentcore-cdk pin here must be bumped to it, before capacity-provider deploys work off the pinned version. (Verified
locally against a bundled build of the L3 branch.)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.
…d DevEx polish
- J2/J3: attach a runtime to a capacity provider by name or ARN, and mount CP volumes
- J4: `capacity-provider delete-session` data-plane command
- TUI: full add-capacity-provider wizard (volumes, encryption/KMS, instance profile,
lifecycle timeouts); capacity-provider attach in the agent create/template and BYO flows
- paired `--volume-name`/`--volume-size` flags (replacing `--volume name:sizeGiB`)
- referential-integrity guard: block removing a capacity provider still referenced by a runtime
- drop `[preview]` from the capacity-provider add/remove menus
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- BYO mapper (mapByoConfigToAgent) omits networkMode when a CP is attached —
the AgentEnvSpec schema rejects a capacityProviderConfiguration combined with
any networkMode, so a BYO CP submission was failing to persist.
- delete-session by-name resolution collects all deployed-state matches and
disambiguates by region (resolve within --region; reject cross-region
ambiguity) instead of blindly taking the first target.
- forward capacityProviderConfiguration + volumes through the import path
(executeImportAgent params + AgentPrimitive/useAddAgent/create callers).
- create rejects the capacity-provider name form (a new project has no sibling
to resolve); only an external ARN can attach at create time.
- generate + BYO wizard advanced-settings routing matches the steps memo when
network and capacityProvider are both selected (CP wins; no skipped screen).
- preserve an explicit volumeEncrypted=false in the CP wizard so the primitive
emits Encrypted:false (service default is true).
- tighten CAPACITY_PROVIDER_ARN_PATTERN to {name}-{10 alnum} so malformed
external ARNs fail at validate time (kept in sync with @aws/agentcore-cdk).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
All review comments are addressed on this head, including the mirrored ARN validation in aws/agentcore-l3-cdk-constructs#336. Focused validation passes. The red web-search E2E check is unrelated to this change and failed on an internal service response.
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
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.
Description
Completes the AgentCore Capacity Provider feature end to end and brings its DevEx to parity with the rest of the CLI.
This PR carries two commits — the revert-of-revert that restores Journey 1, plus a new commit adding Journeys 2–4 and the DevEx polish — so it delivers the full feature:
add capacity-provider/remove capacity-provider), persisted toagentcore.jsonand synthesized to anAWS::BedrockAgentCore::CapacityProviderCloudFormation resource (VPC, launch parameters, named EBS volumes, lifecycle, auto-created operator role), withdeploy/statusintegration. (Restored here viarevert-of-revert; originally feat(capacity-provider): add capacity-provider resource (Journey 1) #2030, reverted in revert: remove capacity-provider Journey 1 #2045 for release timing.)
add agent --capacity-provider <name-or-arn>), rendered ascapacityProviderConfigurationon the runtime (network configis mutually exclusive and omitted).
--cp-volume-name/--cp-volume-mount-path), routed through the existing filesystem-mount framework.capacity-provider delete-sessiondata-plane command to deprovision a live CP session (destructive confirm,--yes, name/id/ARN resolution).add capacity-providerwizard (named volumes, EBS encryption + KMS key, instance profile, lifecycle timeouts); capacity-provider attach is now available in the agentcreate/template flow (and
agentcore create) as well as the BYO flow.--volume-name/--volume-sizeflags (replacing--volume name:sizeGiB, for consistency with the other paired flags); a referential-integrity guard that blocks removing a capacityprovider still referenced by a runtime; and removal of the
[preview]label from the CP add/remove menus.@aws-sdk/client-bedrock-agentcoreto a version that shipsDeleteCapacityProviderSessionCommand.Related Issue
Closes #
Documentation PR
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsDetails:
buildCreateAgentConfigmapping, theuseGenerateWizardCP flow, the wizardbuildStepssequencing, and a duplicate-menu guard.add capacity-providerwizard (forward + back-navigation, including encrypt→KMS→back→No), the agent create/template CP attach,agentcore createwith a CP-by-ARN, andthe BYO CP flow.
READY, invoke returned a response,delete-sessiondeprovisioned the session,and teardown removed the stack cleanly.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.