Amazon SageMaker Unified Studio is in preview release and is subject to change.
Run a deployed Amazon Bedrock IDE app
The following instructions show you the steps you take to run a deployed Amazon Bedrock IDE chat agent app.
Prerequisites for running a chat agent app
Before you can run an app that you have exported, you must first do the following:
To prepare for running an app
-
Download and install Node.js. For more information, see Download Node.js
. 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
For a flow app you also need the following
npm install @aws-sdk/client-bedrock-agent
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 isBRStudioExportedAppInvocationRolePolicy-
. The policy is declared in invocation-policy-*.json. For more information, see Creating roles.exportProjectId
Run the app
To run your 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 app
Switch to the IAM role that you created in step 3 of Prerequisites for running a chat agent app.
Run the app by entering the command you noted in step 3 of Deploy the exported app.