Amazon Bedrock AgentCore is in preview release and is subject to change.
Browser session recording and replay
Browser session recording and replay provides comprehensive observability for debugging, auditing, or training purposes. When you create a browser with session recording enabled, Amazon Bedrock AgentCore automatically captures browser interactions and stores them in your specified Amazon S3 bucket for later analysis.
Session replay captures comprehensive browser interaction data that enables you to view replays and understand the actions that occurred during browser sessions. This functionality helps you resolve errors and improve future invocations by providing detailed insights into browser behavior.
Information collected during session replay includes:
-
Session DOM changes and mutations
-
User actions including clicks, scrolls, and form interactions
-
Console logs and error messages
-
Chrome DevTools Protocol (CDP) events
-
Network events and HTTP requests
How to use session replay
To use session replay functionality:
-
Create a browser tool with recording enabled and specify an Amazon S3 bucket for storage
-
Start a browser session using the browser tool
-
Perform browsing activities through automation or live view
-
Stop the session to save recording data to Amazon S3
-
Access the recorded session through the console or programmatically
Note
-
Session replay captures DOM mutations and reconstructs them during playback. The browser may make cross-origin HTTP requests to fetch external assets during replay.
-
Session replay is not available in the AWS managed Browser (aws.browser.v1).
Permissions needed
To enable session recording, configure the following permissions for your browser tool's execution role. The executionRoleArn will be used to write the recording data to your given s3 bucket.
Amazon S3 permissions for session recording
The execution role requires the following permissions to write recording data to your Amazon S3 bucket:
{ "Sid": "BedrockAgentCoreBuiltInToolsS3Policy", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:ListMultipartUploadParts", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::example-s3-bucket/example-prefix/*", "Condition": { "StringEquals": { "aws:ResourceAccount": "{{accountId}}" } } }
Trust policy for execution role
Add the following trust policy to the execution role:
Once you start a browser session and interact with the browser through either the automation endpoint or live view, session recording automatically generates and uploads data to your specified Amazon S3 bucket in chunks.
The following shows the settings and Amazon S3 location where your recording will be stored.
Once you starts a browser session and interact with the browser either via automation end point or via live view, the session recording will start getting generated and pushed to your provided s3 in chunks.
You can either use the AWS Management Console or programmatically use the browser session replay functionality to perform live view, access and review recordings, and for recording insights.