Using browser extensions
Browser Extensions allow you to install custom extensions into browser sessions at session creation time. This enables you to customize browser behavior with your own extensions for automation tasks, web scraping, testing, and more.
Overview
Browser Extensions in Amazon Bedrock AgentCore work as follows:
-
You provide a list of browser extension ZIP files stored in your own Amazon S3 buckets
-
The service validates that you have access to these Amazon S3 objects using your credentials
-
During browser session startup, extensions are downloaded from your Amazon S3 bucket and installed to the browser session
Prerequisites
Before using browser extensions, ensure you have:
-
Completed the general Browser Prerequisites
-
An Amazon Amazon S3 bucket to store your extension ZIP files
-
IAM permissions to access the Amazon S3 bucket containing your extensions. Add the following permissions to your IAM policy:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ExtensionS3Access", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], "Resource": [ "arn:aws:s3:::<S3Bucket>/<path_to_extensions>/*" ] } ] }Note
The Amazon S3 bucket must be in the same AWS account as the browser session. Extensions have a 10 MB file size limit and a maximum of 10 extensions per session.
Preparing Extension Files
To prepare an extension for use with Browser Tool:
-
Create a Chrome Extension
Your extension should follow the standard Chromium extension format and adhere to Chromium extension guidelines
. Each extension must include a valid manifest.jsonfile. -
Create a ZIP File
Zip the extension directory contents (not the parent folder):
cd my-extension zip -r ../my-extension.zip . -
Upload to S3
Upload the ZIP file to your Amazon S3 bucket:
aws s3 cp my-extension.zip s3://my-extensions-bucket/extensions/my-extension.zip
Creating a browser session with extensions
You can create a browser session with extensions using the AWS CLI, SDK, or API.