eventExpiryDuration minimum is still 7 in @aws/agentcore-cdk

Open
#2,804 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
aws, typescript

Research direction

Reproduce with the three agentcore commands in the report; the first synth error comes from MemorySchema in @aws/agentcore-cdk 1.0.3, where .min(7) should match the harness schema's .min(3). The second gate is MEMORY_EXPIRATION_DAYS_MIN in the aws-cdk-lib Memory L2 construct, adopted in 1.0.0, so check how the construct is instantiated and whether it needs an explicit override or a dependency bump. Done means agentcore deploy creates a memory with eventExpiryDuration 3, with a test covering the boundary.

Written by the indexing model from the issue text.

Description

bug
Description

agentcore add memory --event-expiry-duration 3 works, but agentcore deploy fails at synth.
#956 fixed only the CLI schema. Two checks still enforce 7:

  1. @aws/agentcore-cdk 1.0.3 MemorySchema: .min(7). Its harness schema uses .min(3).
  2. aws-cdk-lib 2.277.0 Memory construct: MEMORY_EXPIRATION_DAYS_MIN=7. It applies since @aws/agentcore-cdk 1.0.0, which switched to the L2 Memory.

CloudFormation already allows 3. With both checks patched locally, agentcore deploy creates a memory with eventExpiryDuration 3.

Steps to Reproduce
agentcore create --name ExpiryRepro --template empty && cd ExpiryRepro
agentcore add memory --name ExpiryMin3 --event-expiry-duration 3
agentcore deploy
Expected Behavior

Synth accepts 3, and deploy creates the memory.

Actual Behavior
memories[0].eventExpiryDuration: Too small: expected number to be >=7

With only the schema patched, synth fails with "Memory expiration days must be between 7 and 365".

CLI Version

1.0.3

Operating System

macOS

Additional Context

Related: #744, #956.

Dominant language
TypeScript
Stars
339
Forks
129
Avg merge
19h 21m
Merged PRs (30d)
125

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/agentcore-cli

All issues in aws/agentcore-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.