Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion docs/_advanced/lazy_listener.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ pip install slack_bolt
# https://pypi.org/project/python-lambda/
pip install python-lambda

# Configure config.yml properly (AWSLambdaFullAccess required)
# Configure config.yml properly
# lambda:InvokeFunction & lambda:GetFunction are required for running lazy listeners
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
echo 'slack_bolt' > requirements.txt
Expand Down Expand Up @@ -90,4 +91,23 @@ def handler(event, context):
slack_handler = SlackRequestHandler(app=app)
return slack_handler.handle(event, context)
```

Please note that the followig IAM permissions would be required for running this example app.

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction",
"lambda:GetFunction"
],
"Resource": "*"
}
]
}
```
</details>
3 changes: 2 additions & 1 deletion examples/aws_lambda/lazy_aws_lambda_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ handler: lazy_aws_lambda.handler
description: My first lambda function
runtime: python3.8
# role: lambda_basic_execution
role: bolt_python_lambda_invocation # AWSLambdaFullAccess
# Have lambda:InvokeFunction & lambda:GetFunction in the allowed actions
role: bolt_python_lambda_invocation

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