Skip to content

Commit c85cfde

Browse files
committed
Add Claude Haiku model permission for query reformulation
1 parent 8d5a53b commit c85cfde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/cdk/resources/RuntimePolicies.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {PolicyStatement, ManagedPolicy} from "aws-cdk-lib/aws-iam"
33

44
// Claude model for RAG responses
55
const RAG_MODEL_ID = "anthropic.claude-3-sonnet-20240229-v1:0"
6+
// Claude model for query reformulation
7+
const QUERY_REFORMULATION_MODEL_ID = "anthropic.claude-3-haiku-20240307-v1:0"
68

79
export interface RuntimePoliciesProps {
810
readonly region: string
@@ -53,7 +55,10 @@ export class RuntimePolicies extends Construct {
5355
// Create managed policy for SlackBot Lambda function
5456
const slackBotPolicy = new PolicyStatement({
5557
actions: ["bedrock:InvokeModel"],
56-
resources: [`arn:aws:bedrock:${props.region}::foundation-model/${RAG_MODEL_ID}`]
58+
resources: [
59+
`arn:aws:bedrock:${props.region}::foundation-model/${RAG_MODEL_ID}`,
60+
`arn:aws:bedrock:${props.region}::foundation-model/${QUERY_REFORMULATION_MODEL_ID}`
61+
]
5762
})
5863

5964
const slackBotPromptPolicy = new PolicyStatement({

0 commit comments

Comments
 (0)