Skip to content

feat(bedrockagentcore): add filesystem configuration to Runtime#37639

Open
mazyu36 wants to merge 5 commits into
aws:mainfrom
mazyu36:feat/agentcore-runtime-filesystem-configuration
Open

feat(bedrockagentcore): add filesystem configuration to Runtime#37639
mazyu36 wants to merge 5 commits into
aws:mainfrom
mazyu36:feat/agentcore-runtime-filesystem-configuration

Conversation

@mazyu36
Copy link
Copy Markdown
Contributor

@mazyu36 mazyu36 commented Apr 19, 2026

Issue # (if applicable)

N/A

Reason for this change

The Runtime L2 did not expose filesystemConfigurations, so users could not configure managed session storage without dropping down to L1.

Description of changes

Adds filesystems: Filesystem[] on the Runtime with a Filesystem.sessionStorage(mountPath) factory. The array shape matches the CFN model (MaxItems = 5) so additional Filesystem factories can be added later without breaking the API.

new agentcore.Runtime(this, 'Runtime', {
  agentRuntimeArtifact,
  filesystems: [
    agentcore.Filesystem.sessionStorage('/mnt/workspace'),
  ],
});

Synth-time validations (per docs): up to 5 filesystems total, at most 1 managed session storage, mount path pattern/length, mount paths unique and not subdirectories of each other (Token-safe).

Describe any new or updated permissions being added

None.

Description of how you validated changes

  • Unit tests for rendering, validations, and limits (140/140 pass).
  • Existing integration test rewritten to the new API; snapshot unchanged.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions Bot added the p2 label Apr 19, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team April 19, 2026 11:49
@github-actions github-actions Bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 19, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.
To suppress a specific rule, see Suppressing Rules.


TestsPassed ✅SkippedFailed
Security Guardian Results48 ran48 passed
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 19, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.
To suppress a specific rule, see Suppressing Rules.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates48 ran48 passed
TestResult
No test annotations available

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Apr 19, 2026
@mazyu36 mazyu36 force-pushed the feat/agentcore-runtime-filesystem-configuration branch from 91599d5 to 2e31c90 Compare April 25, 2026 14:04
@mazyu36 mazyu36 force-pushed the feat/agentcore-runtime-filesystem-configuration branch from 2e31c90 to 9deaab8 Compare April 25, 2026 14:28
Exposes the `FilesystemConfigurations` CloudFormation property on
`AWS::BedrockAgentCore::Runtime` via a new optional `filesystemConfiguration`
prop on the Runtime L2 construct. Users can now configure managed session
storage (persistent filesystem across stop/resume cycles) by providing a
`sessionStorage.mountPath`.

Because CloudFormation currently caps `FilesystemConfigurations` at
MaxItems=1, the L2 accepts a single `FilesystemConfiguration` object and
wraps it into a one-element array before passing to L1 — the same pattern
Lambda uses for its `filesystem` prop vs the underlying `FileSystemConfigs`
array.

MountPath is validated eagerly at synth time (length 6..200, pattern
`^/mnt/[a-zA-Z0-9._-]+/?$`), with `Token.isUnresolved` skipping for
late-bound values.
@mazyu36 mazyu36 force-pushed the feat/agentcore-runtime-filesystem-configuration branch from 9deaab8 to a9b0dbe Compare May 19, 2026 01:21
@mazyu36 mazyu36 changed the title feat(bedrock-agentcore-alpha): add filesystem configuration to Runtime feat(bedrockagentcore): add filesystem configuration to Runtime May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

👋 It looks like your PR description follows the template but is missing a valid issue number in the first section.

PRs without a linked issue will receive lower priority for review and merging. Please update the description to include a reference like Closes #123. If no existing issue matches your change, create one first.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels May 20, 2026
mazyu36 added 2 commits May 22, 2026 01:44
Replace the single-object `filesystemConfiguration` prop with an array-shaped
`filesystems: Filesystem[]` modeled as an abstract `Filesystem` class with a
`Filesystem.sessionStorage(mountPath)` static factory.

Add synth-time validations for service-side limits: up to 5 filesystems total,
at most 1 managed session storage, mount paths unique across all
configurations, and mount paths cannot be subdirectories of each other.
Existing mount path pattern and length checks are kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 pr/community-review-timeout pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants