Repository navigation
Conversation
|
|
||||||||||||||
|
|
||||||||||||||
91599d5 to
2e31c90
Compare
2e31c90 to
9deaab8
Compare
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.
9deaab8 to
a9b0dbe
Compare
|
👋 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 |
…ime-filesystem-configuration
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.
…ime-filesystem-configuration
…ime-filesystem-configuration
|
Automated review A maintainer will still review this — treat the notes below as a starting point. 📌 Commit This PR adds a first-class filesystem configuration API to the AgentCore 🔴 0 blocking · 🟡 0 recommended · ⚪ 1 optional Files with findings (1)
Generated automatically. React 👍 or 👎 to tell us whether this review helped, so we can improve these reviews. |
There was a problem hiding this comment.
See the review summary comment for the overview; the notes below are inline.
| ); | ||
| } | ||
|
|
||
| // Mount path uniqueness and subdirectory checks. Skip tokenized values so we | ||
| // never compare partially-resolved tokens. | ||
| const concretePaths = bound | ||
| .map(b => b.mountPath) | ||
| .filter(p => !Token.isUnresolved(p)); | ||
| const seen = new Set<string>(); | ||
| for (const p of concretePaths) { | ||
| if (seen.has(p)) { | ||
| throw new ValidationError( | ||
| lit`DuplicateMountPath`, |
There was a problem hiding this comment.
⚪ Optional — The mount-path pattern allows an optional trailing slash, so /mnt/data and /mnt/data/ both validate and denote the same mount. The uniqueness check here compares with exact string equality (seen.has(p)), while only the subdirectory check normalizes the trailing slash, so two filesystems with paths ['/mnt/data', '/mnt/data/'] pass the "mount paths must be unique" guard even though they are the same mount (Mount path constraints).
Suggested change: Normalize the trailing slash before the uniqueness comparison, reusing the same single-trailing-slash normalization that isSubPath already applies, so paths that differ only by a trailing slash collapse to the same key in seen.
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 aFilesystem.sessionStorage(mountPath)factory. The array shape matches the CFN model (MaxItems = 5) so additionalFilesystemfactories can be added later without breaking the API.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
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license