Skip to content
v2.278.0

RecordingConfig Struct ​

Recording configuration for browser.

Example ​

ts
// Create an S3 bucket for recordings
const recordingBucket = new s3.Bucket(this, "RecordingBucket", {
  bucketName: "my-browser-recordings",
  removalPolicy: RemovalPolicy.DESTROY, // For demo purposes
});

// Create browser with recording enabled
const browser = new agentcore.BrowserCustom(this, "MyBrowser", {
  browserCustomName: "my_browser",
  description: "Browser with recording enabled",
  networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),
  recordingConfig: {
    enabled: true,
    s3Location: {
      bucketName: recordingBucket.bucketName,
      objectKey: "browser-recordings/",
    },
  },
});
python
# Create an S3 bucket for recordings
recording_bucket = s3.Bucket(self, "RecordingBucket",
    bucket_name="my-browser-recordings",
    removal_policy=RemovalPolicy.DESTROY
)

# Create browser with recording enabled
browser = agentcore.BrowserCustom(self, "MyBrowser",
    browser_custom_name="my_browser",
    description="Browser with recording enabled",
    network_configuration=agentcore.BrowserNetworkConfiguration.using_public_network(),
    recording_config=agentcore.RecordingConfig(
        enabled=True,
        s3_location=s3.Location(
            bucket_name=recording_bucket.bucket_name,
            object_key="browser-recordings/"
        )
    )
)
java
// Create an S3 bucket for recordings
Bucket recordingBucket = Bucket.Builder.create(this, "RecordingBucket")
        .bucketName("my-browser-recordings")
        .removalPolicy(RemovalPolicy.DESTROY)
        .build();

// Create browser with recording enabled
BrowserCustom browser = BrowserCustom.Builder.create(this, "MyBrowser")
        .browserCustomName("my_browser")
        .description("Browser with recording enabled")
        .networkConfiguration(BrowserNetworkConfiguration.usingPublicNetwork())
        .recordingConfig(RecordingConfig.builder()
                .enabled(true)
                .s3Location(Location.builder()
                        .bucketName(recordingBucket.getBucketName())
                        .objectKey("browser-recordings/")
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// Create an S3 bucket for recordings
var recordingBucket = new Bucket(this, "RecordingBucket", new BucketProps {
    BucketName = "my-browser-recordings",
    RemovalPolicy = RemovalPolicy.DESTROY
});

// Create browser with recording enabled
var browser = new BrowserCustom(this, "MyBrowser", new BrowserCustomProps {
    BrowserCustomName = "my_browser",
    Description = "Browser with recording enabled",
    NetworkConfiguration = BrowserNetworkConfiguration.UsingPublicNetwork(),
    RecordingConfig = new RecordingConfig {
        Enabled = true,
        S3Location = new Location {
            BucketName = recordingBucket.BucketName,
            ObjectKey = "browser-recordings/"
        }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// Create an S3 bucket for recordings
recordingBucket := s3.NewBucket(this, jsii.String("RecordingBucket"), &BucketProps{
	BucketName: jsii.String("my-browser-recordings"),
	RemovalPolicy: awscdk.RemovalPolicy_DESTROY,
})

// Create browser with recording enabled
browser := agentcore.NewBrowserCustom(this, jsii.String("MyBrowser"), &BrowserCustomProps{
	BrowserCustomName: jsii.String("my_browser"),
	Description: jsii.String("Browser with recording enabled"),
	NetworkConfiguration: agentcore.BrowserNetworkConfiguration_UsingPublicNetwork(),
	RecordingConfig: &RecordingConfig{
		Enabled: jsii.Boolean(true),
		S3Location: &Location{
			BucketName: recordingBucket.bucketName,
			ObjectKey: jsii.String("browser-recordings/"),
		},
	},
})

Properties ​

enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool = false #
Whether recording is enabled.
s3LocationoptionalLocations3_locationoptionalLocations3LocationoptionalLocationS3LocationoptionalLocationS3LocationoptionalLocation = undefined #
S3 Location Configuration.