Skip to content

Commit 12ce26a

Browse files
committed
Fix #267 Mention the necessity of lambda:InvokeFunction permission in lazy listener document
1 parent efab010 commit 12ce26a

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

docs/_advanced/lazy_listener.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ pip install slack_bolt
5454
# https://pypi.org/project/python-lambda/
5555
pip install python-lambda
5656

57-
# Configure config.yml properly (AWSLambdaFullAccess required)
57+
# Configure config.yml properly
58+
# lambda:InvokeFunction & lambda:GetFunction are required for running lazy listeners
5859
export SLACK_SIGNING_SECRET=***
5960
export SLACK_BOT_TOKEN=xoxb-***
6061
echo 'slack_bolt' > requirements.txt
@@ -90,4 +91,23 @@ def handler(event, context):
9091
slack_handler = SlackRequestHandler(app=app)
9192
return slack_handler.handle(event, context)
9293
```
94+
95+
Please note that the followig IAM permissions would be required for running this example app.
96+
97+
```json
98+
{
99+
"Version": "2012-10-17",
100+
"Statement": [
101+
{
102+
"Sid": "VisualEditor0",
103+
"Effect": "Allow",
104+
"Action": [
105+
"lambda:InvokeFunction",
106+
"lambda:GetFunction"
107+
],
108+
"Resource": "*"
109+
}
110+
]
111+
}
112+
```
93113
</details>

examples/aws_lambda/lazy_aws_lambda_config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ handler: lazy_aws_lambda.handler
55
description: My first lambda function
66
runtime: python3.8
77
# role: lambda_basic_execution
8-
role: bolt_python_lambda_invocation # AWSLambdaFullAccess
8+
# Have lambda:InvokeFunction & lambda:GetFunction in the allowed actions
9+
role: bolt_python_lambda_invocation
910

1011
# S3 upload requires appropriate role with s3:PutObject permission
1112
# (ex. basic_s3_upload), a destination bucket, and the key prefix

0 commit comments

Comments
 (0)