Amazon Bedrock AgentCore is in preview release and is subject to change.
Starting a browser session
After creating a browser, you can start a session to interact with web applications.
- AWS CLI
-
To start a Browser session using the AWS CLI, use the
start-browser-session
command:aws bedrock-agentcore start-browser-session \ --region <Region> \ --browser-identifier "my-browser" \ --name "my-browser-session" \ --session-timeout-seconds 900
- Boto3
-
To start a Browser session using the AWS SDK for Python (Boto3), use the
start_browser_session
method:Request Syntax
The following shows the request syntax:
response = dp_client.start_browser_session( browserIdentifier="aws.browser.v1", name="browser-session-1", sessionTimeoutSeconds=3600 )
- API
-
To create a new browser session using the API, use the following call:
# Using awscurl awscurl -X PUT \ "https://bedrock-agentcore.<Region>.amazonaws.com/browsers/aws.browser.v1/sessions/start" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ --service bedrock-agentcore \ --region <Region> \ -d '{ "name": "browser-session-abc12345", "description": "browser sandbox session", "sessionTimeoutSeconds": 300 }'
Session management
Get Browser session