@@ -1768,7 +1768,7 @@ const envs: Record<string, Partial<StackInput>> = {
17681768## Using Bedrock from a Different AWS Account
17691769
17701770> [ !NOTE]
1771- > Agent-related tasks (Agent, Flow, Prompt Optimization Tool) do not support using a different AWS account and may result in errors during execution.
1771+ > Flow Chat use case and Prompt Optimization Tool do not support using a different AWS account and may result in errors during execution.
17721772
17731773You can use Bedrock from a different AWS account. As a prerequisite, the initial deployment of GenU must be completed.
17741774
@@ -1827,11 +1827,13 @@ For details on how to specify Principals, refer to: [AWS JSON Policy Elements: P
18271827 "Sid" : " AllowBedrockInvokeModel" ,
18281828 "Effect" : " Allow" ,
18291829 "Action" : [
1830- " bedrock:InvokeModel *" ,
1830+ " bedrock:Invoke *" ,
18311831 " bedrock:Rerank" ,
18321832 " bedrock:GetInferenceProfile" ,
18331833 " bedrock:GetAsyncInvoke" ,
1834- " bedrock:ListAsyncInvokes"
1834+ " bedrock:ListAsyncInvokes" ,
1835+ " bedrock:GetAgent*" ,
1836+ " bedrock:ListAgent*"
18351837 ],
18361838 "Resource" : [" *" ]
18371839 },
@@ -1871,6 +1873,13 @@ When using Knowledge Base, you'll need to include these additional parameters:
18711873- ` ragKnowledgeBaseId ` ... Knowledge Base ID created in advance in the different account
18721874 - Knowledge Base must exist in the ` modelRegion `
18731875
1876+ When using Agent Chat use case, you'll need to include these additional parameters:
1877+
1878+ - ` agents ` ... a list of Bedrock Agent configurations, which has following properties:
1879+ - ` displayName ` ... Display name of the agent
1880+ - ` agentId ` ... Agent ID created in advance in the different account
1881+ - ` aliasId ` ... Agent Alias ID created in advance in the different account
1882+
18741883** Edit [ parameter.ts] ( /packages/cdk/parameter.ts ) **
18751884
18761885``` typescript
@@ -1879,8 +1888,17 @@ const envs: Record<string, Partial<StackInput>> = {
18791888 dev: {
18801889 crossAccountBedrockRoleArn:
18811890 ' arn:aws:iam::AccountID:role/PreCreatedRoleName' ,
1882- ragKnowledgeBaseEnabled: true , // Only when using Knowledge Base
1883- ragKnowledgeBaseId: ' XXXXXXXXXX' , // Only when using Knowledge Base
1891+ // Only when using Knowledge Base
1892+ ragKnowledgeBaseEnabled: true ,
1893+ ragKnowledgeBaseId: ' YOUR_KNOWLEDGE_BASE_ID' ,
1894+ // Only when using agents
1895+ agents: [
1896+ {
1897+ displayName: ' YOUR AGENT NAME' ,
1898+ agentId: ' YOUR_AGENT_ID' ,
1899+ aliasId: ' YOUR_AGENT_ALIAS_ID' ,
1900+ },
1901+ ],
18841902 },
18851903};
18861904```
@@ -1892,8 +1910,17 @@ const envs: Record<string, Partial<StackInput>> = {
18921910{
18931911 "context" : {
18941912 "crossAccountBedrockRoleArn" : " arn:aws:iam::AccountID:role/PreCreatedRoleName" ,
1895- "ragKnowledgeBaseEnabled" : true , // Only when using Knowledge Base
1896- "ragKnowledgeBaseId" : " XXXXXXXXXX" // Only when using Knowledge Base
1913+ // Only when using Knowledge Base
1914+ "ragKnowledgeBaseEnabled" : true ,
1915+ "ragKnowledgeBaseId" : " YOUR_KNOWLEDGE_BASE_ID" ,
1916+ // Only when using agents
1917+ "agents" : [
1918+ {
1919+ "displayName" : " YOUR AGENT NAME" ,
1920+ "agentId" : " YOUR_AGENT_ID" ,
1921+ "aliasId" : " YOUR_AGENT_ALIAS_ID"
1922+ }
1923+ ]
18971924 }
18981925}
18991926```
0 commit comments