# CfnMemoryProps

Properties for defining a `CfnMemory`.

Extends: CfnMemoryProps
Used as props by: CfnMemory

- Source: Generated code
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const cfnMemoryProps: bedrockagentcore.CfnMemoryProps = {
  eventExpiryDuration: 123,
  name: 'name',

  // the properties below are optional
  description: 'description',
  encryptionKeyArn: 'encryptionKeyArn',
  indexedKeys: [{
    key: 'key',
    type: 'type',
  }],
  memoryExecutionRoleArn: 'memoryExecutionRoleArn',
  memoryStrategies: [{
    customMemoryStrategy: {
      name: 'name',

      // the properties below are optional
      configuration: {
        episodicOverride: {
          consolidation: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
          extraction: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
          reflection: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',

            // the properties below are optional
            memoryRecordSchema: {
              metadataSchema: [{
                key: 'key',

                // the properties below are optional
                extractionConfig: {
                  llmExtractionConfig: {
                    definition: 'definition',

                    // the properties below are optional
                    llmExtractionInstruction: 'llmExtractionInstruction',
                    validation: {
                      numberValidation: {
                        maxValue: 123,
                        minValue: 123,
                      },
                      stringListValidation: {
                        allowedValues: ['allowedValues'],
                        maxItems: 123,
                      },
                      stringValidation: {
                        allowedValues: ['allowedValues'],
                      },
                    },
                  },
                },
                extractionType: 'extractionType',
                type: 'type',
              }],
            },
            namespaces: ['namespaces'],
            namespaceTemplates: ['namespaceTemplates'],
          },
        },
        selfManagedConfiguration: {
          historicalContextWindowSize: 123,
          invocationConfiguration: {
            payloadDeliveryBucketName: 'payloadDeliveryBucketName',
            topicArn: 'topicArn',
          },
          triggerConditions: [{
            messageBasedTrigger: {
              messageCount: 123,
            },
            timeBasedTrigger: {
              idleSessionTimeout: 123,
            },
            tokenBasedTrigger: {
              tokenCount: 123,
            },
          }],
        },
        semanticOverride: {
          consolidation: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
          extraction: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
        },
        summaryOverride: {
          consolidation: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
        },
        userPreferenceOverride: {
          consolidation: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
          extraction: {
            appendToPrompt: 'appendToPrompt',
            modelId: 'modelId',
          },
        },
      },
      createdAt: 'createdAt',
      description: 'description',
      memoryRecordSchema: {
        metadataSchema: [{
          key: 'key',

          // the properties below are optional
          extractionConfig: {
            llmExtractionConfig: {
              definition: 'definition',

              // the properties below are optional
              llmExtractionInstruction: 'llmExtractionInstruction',
              validation: {
                numberValidation: {
                  maxValue: 123,
                  minValue: 123,
                },
                stringListValidation: {
                  allowedValues: ['allowedValues'],
                  maxItems: 123,
                },
                stringValidation: {
                  allowedValues: ['allowedValues'],
                },
              },
            },
          },
          extractionType: 'extractionType',
          type: 'type',
        }],
      },
      namespaces: ['namespaces'],
      namespaceTemplates: ['namespaceTemplates'],
      status: 'status',
      strategyId: 'strategyId',
      type: 'type',
      updatedAt: 'updatedAt',
    },
    episodicMemoryStrategy: {
      name: 'name',

      // the properties below are optional
      createdAt: 'createdAt',
      description: 'description',
      memoryRecordSchema: {
        metadataSchema: [{
          key: 'key',

          // the properties below are optional
          extractionConfig: {
            llmExtractionConfig: {
              definition: 'definition',

              // the properties below are optional
              llmExtractionInstruction: 'llmExtractionInstruction',
              validation: {
                numberValidation: {
                  maxValue: 123,
                  minValue: 123,
                },
                stringListValidation: {
                  allowedValues: ['allowedValues'],
                  maxItems: 123,
                },
                stringValidation: {
                  allowedValues: ['allowedValues'],
                },
              },
            },
          },
          extractionType: 'extractionType',
          type: 'type',
        }],
      },
      namespaces: ['namespaces'],
      namespaceTemplates: ['namespaceTemplates'],
      reflectionConfiguration: {
        memoryRecordSchema: {
          metadataSchema: [{
            key: 'key',

            // the properties below are optional
            extractionConfig: {
              llmExtractionConfig: {
                definition: 'definition',

                // the properties below are optional
                llmExtractionInstruction: 'llmExtractionInstruction',
                validation: {
                  numberValidation: {
                    maxValue: 123,
                    minValue: 123,
                  },
                  stringListValidation: {
                    allowedValues: ['allowedValues'],
                    maxItems: 123,
                  },
                  stringValidation: {
                    allowedValues: ['allowedValues'],
                  },
                },
              },
            },
            extractionType: 'extractionType',
            type: 'type',
          }],
        },
        namespaces: ['namespaces'],
        namespaceTemplates: ['namespaceTemplates'],
      },
      status: 'status',
      strategyId: 'strategyId',
      type: 'type',
      updatedAt: 'updatedAt',
    },
    semanticMemoryStrategy: {
      name: 'name',

      // the properties below are optional
      createdAt: 'createdAt',
      description: 'description',
      memoryRecordSchema: {
        metadataSchema: [{
          key: 'key',

          // the properties below are optional
          extractionConfig: {
            llmExtractionConfig: {
              definition: 'definition',

              // the properties below are optional
              llmExtractionInstruction: 'llmExtractionInstruction',
              validation: {
                numberValidation: {
                  maxValue: 123,
                  minValue: 123,
                },
                stringListValidation: {
                  allowedValues: ['allowedValues'],
                  maxItems: 123,
                },
                stringValidation: {
                  allowedValues: ['allowedValues'],
                },
              },
            },
          },
          extractionType: 'extractionType',
          type: 'type',
        }],
      },
      namespaces: ['namespaces'],
      namespaceTemplates: ['namespaceTemplates'],
      status: 'status',
      strategyId: 'strategyId',
      type: 'type',
      updatedAt: 'updatedAt',
    },
    summaryMemoryStrategy: {
      name: 'name',

      // the properties below are optional
      createdAt: 'createdAt',
      description: 'description',
      memoryRecordSchema: {
        metadataSchema: [{
          key: 'key',

          // the properties below are optional
          extractionConfig: {
            llmExtractionConfig: {
              definition: 'definition',

              // the properties below are optional
              llmExtractionInstruction: 'llmExtractionInstruction',
              validation: {
                numberValidation: {
                  maxValue: 123,
                  minValue: 123,
                },
                stringListValidation: {
                  allowedValues: ['allowedValues'],
                  maxItems: 123,
                },
                stringValidation: {
                  allowedValues: ['allowedValues'],
                },
              },
            },
          },
          extractionType: 'extractionType',
          type: 'type',
        }],
      },
      namespaces: ['namespaces'],
      namespaceTemplates: ['namespaceTemplates'],
      status: 'status',
      strategyId: 'strategyId',
      type: 'type',
      updatedAt: 'updatedAt',
    },
    userPreferenceMemoryStrategy: {
      name: 'name',

      // the properties below are optional
      createdAt: 'createdAt',
      description: 'description',
      memoryRecordSchema: {
        metadataSchema: [{
          key: 'key',

          // the properties below are optional
          extractionConfig: {
            llmExtractionConfig: {
              definition: 'definition',

              // the properties below are optional
              llmExtractionInstruction: 'llmExtractionInstruction',
              validation: {
                numberValidation: {
                  maxValue: 123,
                  minValue: 123,
                },
                stringListValidation: {
                  allowedValues: ['allowedValues'],
                  maxItems: 123,
                },
                stringValidation: {
                  allowedValues: ['allowedValues'],
                },
              },
            },
          },
          extractionType: 'extractionType',
          type: 'type',
        }],
      },
      namespaces: ['namespaces'],
      namespaceTemplates: ['namespaceTemplates'],
      status: 'status',
      strategyId: 'strategyId',
      type: 'type',
      updatedAt: 'updatedAt',
    },
  }],
  namespaceKeys: [{
    key: 'key',

    // the properties below are optional
    validation: {
      allowedValues: ['allowedValues'],
      regexPattern: 'regexPattern',
    },
  }],
  streamDeliveryResources: {
    resources: [{
      kinesis: {
        contentConfigurations: [{
          type: 'type',

          // the properties below are optional
          level: 'level',
        }],
        dataStreamArn: 'dataStreamArn',
      },
    }],
  },
  tags: {
    tagsKey: 'tags',
  },
};
```

## Properties

- `description`: string — Description of the Memory resource.

- `encryptionKeyArn`: string — The memory encryption key Amazon Resource Name (ARN).

- `eventExpiryDuration`: number (required) — The event expiry configuration.

- `indexedKeys`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.IndexedKeyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.IndexedKeyProperty.html)[] — List of indexed keys for the memory.

- `memoryExecutionRoleArn`: string — The memory role ARN.

- `memoryStrategies`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.MemoryStrategyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.MemoryStrategyProperty.html)[] — The memory strategies.

- `name`: string (required) — The memory name.

- `namespaceKeys`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.NamespaceKeyEntryProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.NamespaceKeyEntryProperty.html)[] — List of namespace variable key definitions for a memory resource.

- `streamDeliveryResources`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.StreamDeliveryResourcesProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.StreamDeliveryResourcesProperty.html)

- `tags`: { [key: string]: string } — The tags for the resources.
