interface Location
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.S3.Location |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3#Location |
Java | software.amazon.awscdk.services.s3.Location |
Python | aws_cdk.aws_s3.Location |
TypeScript (source) | aws-cdk-lib » aws_s3 » Location |
An interface that represents the location of a specific object in an S3 Bucket.
Example
const bucket = new s3.Bucket(this, 'memoryBucket', {
bucketName: 'test-memory',
removalPolicy: cdk.RemovalPolicy.DESTROY,
autoDeleteObjects: true,
});
const topic = new sns.Topic(this, 'topic');
// Create a custom semantic memory strategy
const selfManagedStrategy = agentcore.MemoryStrategy.usingSelfManaged({
name: "selfManagedStrategy",
description: "self managed memory strategy",
historicalContextWindowSize: 5,
invocationConfiguration: {
topic: topic,
s3Location: {
bucketName: bucket.bucketName,
objectKey: 'memory/',
}
},
triggerConditions: {
messageBasedTrigger: 1,
timeBasedTrigger: cdk.Duration.seconds(10),
tokenBasedTrigger: 100
}
});
// Create memory with custom strategy
const memory = new agentcore.Memory(this, "MyMemory", {
memoryName: "my-custom-memory",
description: "Memory with custom strategy",
expirationDuration: cdk.Duration.days(90),
memoryStrategies: [selfManagedStrategy],
});
Properties
| Name | Type | Description |
|---|---|---|
| bucket | string | The name of the S3 Bucket the object is in. |
| object | string | The path inside the Bucket where the object is located at. |
| object | string | The S3 object version. |
bucketName
Type:
string
The name of the S3 Bucket the object is in.
objectKey
Type:
string
The path inside the Bucket where the object is located at.
objectVersion?
Type:
string
(optional)
The S3 object version.

.NET
Go
Java
Python
TypeScript (