aws-chatbot: addXXXPermisions() does not work
See original GitHub issueReproduction Steps
What did you expect to happen?
According to https://docs.aws.amazon.com/cdk/api/latest/docs/aws-chatbot-readme.html the following should work
slackChannel.addLambdaInvokeCommandPermissions();
slackChannel.addNotificationPermissions();
slackChannel.addSupportCommandPermissions();
slackChannel.addReadOnlyCommandPermissions();
What actually happened?
Environment
- **CDK CLI Version :*1.91.0 *
- **Framework Version:*1.91.0 *
- **Node.js Version:v10.24.0
- **OS :Amazon Linux AMI 2018.03
- **Language (Version):TypeScript Version 3.7.5
Other
Of course I can do it long way as shown below but it would be nice to reduce lines of code if above works.
const lambdaInvokeCommandStatement = new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
resources: ['*'],
actions: [
"lambda:invokeAsync",
"lambda:invokeFunction"
],
});
slackChannel.addToRolePolicy(lambdaInvokeCommandStatement);
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Troubleshooting AWS Chatbot
If the topic doesn't, open the AWS Chatbot console, open your authorized client, and then look at the Configured channels or Configured webhooks...
Read more >Troubleshooting AWS Chatbot identity and access
Use the following information to help you diagnose and fix common issues that you might encounter when working with AWS Chatbot and IAM....
Read more >IAM resource-level permissions for AWS Chatbot
Resource-level permissions define the AWS resources on which you allow assigned entities (users, groups, and roles) to perform actions.
Read more >Understanding AWS Chatbot permissions
Open the AWS Chatbot console at https://console.aws.amazon.com/chatbot/ . Choose the configured client, and choose the name of the configured channel or ...
Read more >Identity and Access Management for AWS Chatbot
To get a high-level view of how AWS Chatbot and other AWS services work with IAM, see AWS Services ... The permissions determine...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BLasan whoever wants to pick it is welcome. Yeah it’s just replacing references in the docs to the old methods with usage of addToResourcePolicy.
Can I work on this? Basically we need to replace
slackChannel.addLambdaInvokeCommandPermissions();
withslackChannel.addToRolePolicy(lambdaInvokeCommandStatement);
right?