Run a deployed chat app - Amazon Bedrock Studio

Amazon Bedrock Studio, renamed to Amazon Bedrock IDE, is now available in Amazon SageMaker Unified Studio. Amazon Bedrock Studio will be available until February 28, 2025. You may access existing workspaces in this previous version through February 28, 2025, but you may not create new workspaces. To access the enhanced GA version of Amazon Bedrock Studio with additional features and capabilities, you can create a new Amazon SageMaker Unified Studio domain. To learn about Amazon Bedrock Studio IDE, see the documentation.

Run a deployed chat app

The following instructions show you the steps you take to run a deployed Amazon Bedrock Studio chat app.

Prerequisites for running a chat app

Before you can run a chat app that you have exported, you must first do the following:

To prepare for running a chat app
  1. Download and install Node.js. For more information, see Download Node.js.

  2. At the command prompt, install third-party Node.js libraries by running the following commands:

    npm install minimist npm install aws-sdk npm install @aws-sdk/credential-providers npm install @aws-sdk/client-bedrock-agent-runtime npm install @aws-sdk/client-bedrock-runtime
  3. Create or update an IAM role in which you want to run the app. For the policy, use the policy created by deploy-app.sh when you exported the app. The policy name is BRStudioExportedAppInvocationRolePolicy-exportProjectId. The policy is declared in invocation-policy-*.json. For more information, see Creating roles.

Run the chat app

To run your chat app, you need an IAM role with with permissions to invoke Amazon Bedrock resources. When you deploy the app, the AWS CloudFormation stack deployed through deploy-app.sh script provisions a suitable policy in your AWS account (declared in invocation-policy-*.json).

To run the chat app
  1. Switch to the IAM role that you created in step 3 of Prerequisites for running a chat app.

  2. Run the app by entering the command you noted in step 3 of Deploy the chat app.