Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to remove false positive from credential check #6174

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions javascriptv3/example_code/bedrock-agent/actions/create-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,22 @@ export const createAgent = async (

// Invoke main function if this file was run directly.
if (process.argv[1] === fileURLToPath(import.meta.url)) {
// Replace the placeholders for agentName and roleArn with a unique name for the new agent and
// the Amazon Resource Name (ARN) of an existing execution role that the agent can use.
// Replace the placeholders for agentName and accountId, and roleName with a unique name for the new agent,
// the id of your AWS account, and the name of an existing execution role that the agent can use inside your account.
// For foundationModel, specify the desired model. Ensure to remove the brackets '[]' before adding your data.

// A string (max 100 chars) that can include letters, numbers, dashes '-', and underscores '_'.
const agentName = "[your-bedrock-agent-name]";

// The ARN for the agent's execution role, prefixed by `AmazonBedrockExecutionRoleForAgents_`.
// Your AWS account id.
const accountId = "[123456789012]";

// The name of the agent's execution role. It must be prefixed by `AmazonBedrockExecutionRoleForAgents_`.
const roleName = "[AmazonBedrockExecutionRoleForAgents_your-role-name]";

// The ARN for the agent's execution role.
// Follow the ARN format: 'arn:aws:iam::account-id:role/role-name'
const roleArn =
"[arn:aws:iam::123456789012:role/AmazonBedrockExecutionRoleForAgents_myRoleName]";
const roleArn = `arn:aws:iam::${accountId}:role/${roleName}`;

// Specify the model for the agent. Change if a different model is preferred.
const foundationModel = "anthropic.claude-v2";
Expand Down
Loading