Skip to content

Commit

Permalink
fix(aws-cdk-readme): deprecated method addLambdaInvokeCommandPermissions
Browse files Browse the repository at this point in the history
fixes #13444
  • Loading branch information
BLasan committed Mar 10, 2021
1 parent 7711981 commit 0f547f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/@aws-cdk/aws-chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ const slackChannel = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel
slackChannelId: 'YOUR_SLACK_CHANNEL_ID',
});

slackChannel.addLambdaInvokeCommandPermissions();
const invokeCommandStatement = new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
resources: ["RESOURCE_ARNS_ALLOWED"],
actions: ["INVOKING_ACTION_ALLOWED"],
});

slackChannel.addToRolePolicy(invokeCommandStatement);
slackChannel.addNotificationPermissions();
slackChannel.addSupportCommandPermissions();
slackChannel.addReadOnlyCommandPermissions();
Expand Down

0 comments on commit 0f547f8

Please sign in to comment.