AWS bedrock-agentcore documentation change
Summary
Restructured documentation into numbered steps (Step 0-4), updated prerequisites to require Python 3.10+ with version check command, simplified IAM permission setup instructions, and streamlined browser usage workflow.
Security assessment
The changes enhance security documentation by emphasizing IAM permission requirements and credential verification steps, but don't address any specific vulnerability. The added clarity for security setup (IAM policies, credential checks) improves security posture but isn't in response to a known incident.
Diff
diff --git a/bedrock-agentcore/latest/devguide/browser-onboarding.md b/bedrock-agentcore/latest/devguide/browser-onboarding.md index 29c816066..80ad2ff8e 100644 --- a//bedrock-agentcore/latest/devguide/browser-onboarding.md +++ b//bedrock-agentcore/latest/devguide/browser-onboarding.md @@ -5 +5 @@ -PrerequisitesUsing AgentCore Browser via AWS StrandsFind your resourcesNext steps +Step 0:PrerequisitesStep 1: Install dependenciesStep 2: Create your agent with AgentCore BrowserStep 3: Run the agentStep 4: View the browser session liveFind your resourcesNext steps @@ -15 +15 @@ This page covers the prerequisites and helps you get started using _AWS Strands_ - * Prerequisites + * Step 0:Prerequisites @@ -17 +17,7 @@ This page covers the prerequisites and helps you get started using _AWS Strands_ - * Using AgentCore Browser via AWS Strands + * Step 1: Install dependencies + + * Step 2: Create your agent with AgentCore Browser + + * Step 3: Run the agent + + * Step 4: View the browser session live @@ -26 +32 @@ This page covers the prerequisites and helps you get started using _AWS Strands_ -## Prerequisites +## Step 0:Prerequisites @@ -30 +36 @@ Before you start, ensure you have: - * AWS account with credentials configured. See Configuring your credentials. + * Python version 3.10 or newer. You can check your version using the below command. If you need to update Python, visit [python.org/downloads](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/python.org/downloads). @@ -32 +38 @@ Before you start, ensure you have: - * Python 3.10+ installed + python3 --version @@ -36,2 +41,0 @@ Before you start, ensure you have: - * IAM execution role with the required permissions. See Configuring your credentials. - @@ -44,10 +48 @@ Before you start, ensure you have: - - - -### Configuring your credentials - -Perform the following steps to configure your AWS credentials and attach the required permissions to use AgentCore Browser. - - 1. ###### Verify your AWS credentials - -Confirm your AWS credentials are configured: + * Verify your AWS account using the below command. Take note of the user or credentials returned, as you'll be attaching permissions to this identity in the next step. If this command fails, configure your credentials. For more information, see [Configuration and credential file settings](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) in the AWS CLI documentation. @@ -57,7 +52 @@ Confirm your AWS credentials are configured: -Take note of the user or credentials returned here, as you'll be attaching permissions to this identity in the next step. - -If this command fails, configure your credentials. For more information, see [Configuration and credential file settings](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) in the AWS CLI documentation. - - 2. ###### Attach required permissions - -Your IAM user or role needs permissions to use AgentCore Browser. Attach this policy to your IAM identity: + * Attach IAM execution role with the required permissions. Attach this policy to your IAM identity. To attach this policy in Console: Navigate to the IAM Console, Find your user or role (the one returned in previous step), Click Add permissions → Create inline policy, Switch to JSON view and paste the policy above, Name it AgentCoreBrowserAccess , and Save. @@ -100,7 +88,0 @@ Your IAM user or role needs permissions to use AgentCore Browser. Attach this po -**To attach this policy** : - - * Navigate to the IAM Console - - * Find your user or role (the one returned by `aws sts get-caller-identity`) - - * Click **Add permissions** → **Create inline policy** @@ -108 +89,0 @@ Your IAM user or role needs permissions to use AgentCore Browser. Attach this po - * Switch to JSON view and paste the policy above @@ -110 +90,0 @@ Your IAM user or role needs permissions to use AgentCore Browser. Attach this po - * Name it `AgentCoreBrowserAccess` and save @@ -116,37 +96 @@ Replace `<Region>` with your actual AWS Region and `<account_id>` with your AWS - 3. ###### Verify your setup - -Confirm your setup is correct by checking: - - * Your AWS credentials are properly configured - - * The IAM policy is attached to your user or role - - * Model access is enabled in the Amazon Bedrock console - - - - -The following sections show you how to use the Amazon Bedrock AgentCore Browser with and without the agent framework. Using the Browser directly without an agent framework is especially useful when you want to execute specific browser automation tasks programmatically. - -## Using AgentCore Browser via AWS Strands - -The following sections show you how to use the Amazon Bedrock AgentCore Browser with the Strands SDK. Before you go through the examples in this section, see Prerequisites. - -###### Topics - - * Step 1: Install dependencies - - * Step 2: Create your agent with AgentCore Browser - - * Step 3: Run the agent - - * Step 4: View the browser session live - - - - -### Step 1: Install dependencies - -Create a project folder and install the required packages: - -###### Note +## Step 1: Install dependencies @@ -154,9 +98 @@ Create a project folder and install the required packages: -On Windows, use: `.venv\Scripts\activate` - - - mkdir agentcore-browser-quickstart - cd agentcore-browser-quickstart - python3 -m venv .venv - source .venv/bin/activate - -Install the required packages: +Before you start, make sure you have installed the required packages: @@ -182 +118,3 @@ These packages provide: -### Step 2: Create your agent with AgentCore Browser +If you face issues with pip install , review the instructions [here](https://packaging.python.org/en/latest/tutorials/installing-packages/). Amazon Bedrock AgentCore requires requires Python version 3.10 or newer. + +## Step 2: Create your agent with AgentCore Browser @@ -222 +160 @@ This code: -### Step 3: Run the agent +## Step 3: Run the agent @@ -244 +182 @@ If you encounter errors, verify: -### Step 4: View the browser session live +## Step 4: View the browser session live @@ -274,19 +211,0 @@ The live view interface provides: -This example: - - * Creates a browser session using the browser_session client - - * Retrieve the WebSocket connection details required for automation and live view. - - * Start the viewer server, which launches a browser window to display the remote browser session via Live View. - - * Connect Playwright to the remote browser via automation endpoint and navigate to Amazon.com. - - * Keep the session alive until manually interrupted. - - * Handle cleanup gracefully by terminating the session and releasing resources when the program exits. - - - - -The BrowserViewerServer component provides a local web server that connects to the remote browser session and displays it in a browser window, allowing you to see and interact with the browser in real-time. - @@ -314,2 +232,0 @@ Now that you have AgentCore Browser working, explore these advanced features: - * [Use cases](./browser-tool.html#browser-use-cases) \- See real-world implementation examples -