Skip to content

feat(bedrock-agentcore-alpha): add StreamDeliveryResources support to Memory L2 Construct#37527

Open
matoom-nomu wants to merge 6 commits intoaws:mainfrom
matoom-nomu:fix/issue-37525-memory-stream-delivery
Open

feat(bedrock-agentcore-alpha): add StreamDeliveryResources support to Memory L2 Construct#37527
matoom-nomu wants to merge 6 commits intoaws:mainfrom
matoom-nomu:fix/issue-37525-memory-stream-delivery

Conversation

@matoom-nomu
Copy link
Copy Markdown
Contributor

@matoom-nomu matoom-nomu commented Apr 6, 2026

Issue # (if applicable)

None

Reason for this change

The AWS::BedrockAgentCore::Memory L1 resource now supports StreamDeliveryResources.

Description of changes

  • Added StreamDeliveryContentType and StreamDeliveryContentLevel enums

  • Added StreamDeliveryContentConfiguration and StreamDeliveryResource interfaces.
    Both use arrays to match the CloudFormation schema, but currently enforce max length of 1 per the CFn spec.
    (It seems odd that the CFn spec expects an array but caps it at max 1. I assumed this limit will be raised in a future update, so kept the array type to avoid a breaking change later.)

  • Added optional streamDeliveryResources prop to MemoryProps (defaults to MEMORY_RECORDS + FULL_CONTENT when contentConfigurations is omitted)

  • Added addStreamDeliveryResource() method for post-instantiation configuration

  • Added README documentation with code examples

Describe any new or updated permissions being added

The Memory execution role is automatically granted the following permissions on each configured Kinesis Data Stream:

  • kinesis:ListShards, kinesis:PutRecord, kinesis:PutRecords (via stream.grantWrite())
  • kinesis:DescribeStream (explicitly required per the setup guide Document)

Description of how you validated changes

Added unit and integ test.

Note: The existing integ.memory.ts was using BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0 directly for custom memory strategies, which fails with "Bedrock model is not available in region" because AgentCore Memory requires a cross-region inference profile ID (e.g. us.anthropic.claude-sonnet-4-... confirmed at GUI).

SS2026-04-07 14 22 28

I fixed this by using CrossRegionInferenceProfile.fromConfig() instead.
Happy to split this change into a separate PR if preferred.

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 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK p2 labels Apr 6, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team April 6, 2026 09:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 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.


TestsPassed ✅SkippedFailed
Security Guardian Results24 ran24 passed
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 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.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates24 ran24 passed
TestResult
No test annotations available

@aws-cdk-automation aws-cdk-automation added the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Apr 6, 2026
@matoom-nomu matoom-nomu force-pushed the fix/issue-37525-memory-stream-delivery branch from 584bc24 to 46a0938 Compare April 6, 2026 12:06
@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 6, 2026
nomu added 2 commits April 6, 2026 23:15
…emory L2 construct

Add support for real-time push-based streaming of memory record lifecycle
events (created, updated, deleted) to Amazon Kinesis Data Streams.

closes aws#37525
@matoom-nomu matoom-nomu force-pushed the fix/issue-37525-memory-stream-delivery branch from 46a0938 to 5bd63bd Compare April 6, 2026 14:18
…ssRegionInferenceProfile

- Remove separate integ.memory-stream-delivery test file and snapshot
- Add stream delivery test case to integ.memory.ts
- Fix custom strategy model to use CrossRegionInferenceProfile (us.anthropic.claude-sonnet-4)
  to resolve 'Bedrock model is not available in region' error
- Update integ.memory snapshot with all changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. valued-contributor [Pilot] contributed between 6-12 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants