Skip to content
v2.275.0

Experimental

@aws-cdk/aws-bedrock-agentcore-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

MemoryProps Struct ​

Properties for creating a Memory resource.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_kms as kms } from 'aws-cdk-lib';

declare const key: kms.Key;
declare const memoryStrategy: bedrock_agentcore_alpha.IMemoryStrategy;
declare const role: iam.Role;
const memoryProps: bedrock_agentcore_alpha.MemoryProps = {
  description: 'description',
  executionRole: role,
  expirationDuration: cdk.Duration.minutes(30),
  kmsKey: key,
  memoryName: 'memoryName',
  memoryStrategies: [memoryStrategy],
  tags: {
    tagsKey: 'tags',
  },
};

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
Optional description for the memory Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

Default: No description

executionRoleoptionalIRoleexecution_roleoptionalIRoleexecutionRoleoptionalIRoleExecutionRoleoptionalIRoleExecutionRoleoptionalIRole#
The IAM role that provides permissions for the memory to access AWS services when using custom strategies.

Default: A new role will be created.

expirationDurationoptionalDurationexpiration_durationoptionalDurationexpirationDurationoptionalDurationExpirationDurationoptionalDurationExpirationDurationoptionalDuration#
Short-term memory expiration in days (between 7 and 365).

Default: 90 days

Sets the short-term (raw event) memory retention. Events older than the specified duration will expire and no longer be stored.

kmsKeyoptionalIKeykms_keyoptionalIKeykmsKeyoptionalIKeyKmsKeyoptionalIKeyKmsKeyoptionalIKey#
Custom KMS key to use for encryption.

Default: Your data is encrypted with a key that AWS owns and manages for you

memoryNameoptionalstringmemory_nameoptionalstrmemoryNameoptionalStringMemoryNameoptionalstringMemoryNameoptional*string#
The name of the memory Valid characters are a-z, A-Z, 0-9, _ (underscore) The name must start with a letter and can be up to 48 characters long Pattern: [a-zA-Z][a-zA-Z0-9_]{0,47}.

Default: auto generate

memoryStrategiesoptionalIMemoryStrategy[]memory_strategiesoptionaltyping.List[IMemoryStrategy]memoryStrategiesoptionalList<IMemoryStrategy>MemoryStrategiesoptionalIMemoryStrategy[]MemoryStrategiesoptional*[]IMemoryStrategy#
If you need long-term memory for context recall across sessions, you can setup memory extraction strategies to extract the relevant memory from the raw events.

Default: No extraction strategies (short term memory only)

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
Tags (optional) A list of key:value pairs of tags to apply to this memory resource.

Default: no tags