File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -376,14 +376,6 @@ export class EpsAssistMeStack extends Stack {
376376 ]
377377 } )
378378
379- // ==== IAM Policy for Lambda to invoke itself ====
380- const lambdaSelfInvokePolicy = new PolicyStatement ( {
381- actions : [ "lambda:InvokeFunction" ] ,
382- resources : [
383- `arn:aws:lambda:${ this . region } :${ this . account } :function:${ slackBotLambda . function . functionName } `
384- ]
385- } )
386-
387379 // ==== Lambda environment variables ====
388380 const lambdaEnv : { [ key : string ] : string } = {
389381 RAG_MODEL_ID : "anthropic.claude-3-sonnet-20240229-v1:0" ,
@@ -413,6 +405,14 @@ export class EpsAssistMeStack extends Stack {
413405 additionalPolicies : [ ]
414406 } )
415407
408+ // ==== IAM Policy for Lambda to invoke itself ====
409+ const lambdaSelfInvokePolicy = new PolicyStatement ( {
410+ actions : [ "lambda:InvokeFunction" ] ,
411+ resources : [
412+ `arn:aws:lambda:${ this . region } :${ this . account } :function:${ slackBotLambda . function . functionName } `
413+ ]
414+ } )
415+
416416 // ==== Attach all policies to SlackBot Lambda role ====
417417 slackBotLambda . function . addToRolePolicy ( slackLambdaSSMPolicy )
418418 slackBotLambda . function . addToRolePolicy ( lambdaSelfInvokePolicy )
You can’t perform that action at this time.
0 commit comments