Skip to content

Commit 5e41ae8

Browse files
authored
docs(examples): update aws lambda tooling and iam role names (#1224)
1 parent 5f4c847 commit 5e41ae8

File tree

9 files changed

+23
-30
lines changed

9 files changed

+23
-30
lines changed

examples/aws_lambda/aws_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ def handler(event, context):
3131
# export SLACK_BOT_TOKEN=xoxb-***
3232

3333
# rm -rf vendor && cp -pr ../../src/* vendor/
34-
# pip install python-lambda
34+
# pip install git+https://github.com/nficano/python-lambda
3535
# lambda deploy --config-file aws_lambda_config.yaml --requirements requirements.txt

examples/aws_lambda/aws_lambda_config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function_name: bolt_py_function
44
handler: aws_lambda.handler
55
description: My first lambda function
66
runtime: python3.8
7-
# role: lambda_basic_execution
7+
role: bolt_python_lambda_invocation
88

99
# S3 upload requires appropriate role with s3:PutObject permission
1010
# (ex. basic_s3_upload), a destination bucket, and the key prefix
@@ -20,12 +20,11 @@ aws_secret_access_key:
2020
# timeout: 15
2121
# memory_size: 512
2222
# concurrency: 500
23-
#
2423

25-
# Experimental Environment variables
24+
# Lambda environment variables
2625
environment_variables:
27-
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
28-
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
26+
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
27+
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
2928

3029
# If `tags` is uncommented then tags will be set at creation or update
3130
# time. During an update all other tags will be removed except the tags

examples/aws_lambda/aws_lambda_oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ def handler(event, context):
4646
# - AWSLambdaRole
4747

4848
# rm -rf latest_slack_bolt && cp -pr ../../src latest_slack_bolt
49-
# pip install python-lambda
49+
# pip install git+https://github.com/nficano/python-lambda
5050
# lambda deploy --config-file aws_lambda_oauth_config.yaml --requirements requirements_oauth.txt

examples/aws_lambda/aws_lambda_oauth_config.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ function_name: bolt_py_oauth_function
44
handler: aws_lambda_oauth.handler
55
description: My first lambda function
66
runtime: python3.8
7-
# role: lambda_basic_execution
87
role: bolt_python_s3_storage
98

109
# S3 upload requires appropriate role with s3:PutObject permission
@@ -21,17 +20,15 @@ aws_secret_access_key:
2120
# timeout: 15
2221
# memory_size: 512
2322
# concurrency: 500
24-
#
2523

26-
# Experimental Environment variables
24+
# Lambda environment variables
2725
environment_variables:
28-
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
29-
SLACK_CLIENT_ID: ${SLACK_CLIENT_ID}
30-
SLACK_CLIENT_SECRET: ${SLACK_CLIENT_SECRET}
31-
SLACK_SCOPES: ${SLACK_SCOPES}
32-
SLACK_INSTALLATION_S3_BUCKET_NAME: ${SLACK_INSTALLATION_S3_BUCKET_NAME}
33-
SLACK_STATE_S3_BUCKET_NAME: ${SLACK_STATE_S3_BUCKET_NAME}
34-
26+
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
27+
SLACK_CLIENT_ID: ${SLACK_CLIENT_ID}
28+
SLACK_CLIENT_SECRET: ${SLACK_CLIENT_SECRET}
29+
SLACK_SCOPES: ${SLACK_SCOPES}
30+
SLACK_INSTALLATION_S3_BUCKET_NAME: ${SLACK_INSTALLATION_S3_BUCKET_NAME}
31+
SLACK_STATE_S3_BUCKET_NAME: ${SLACK_STATE_S3_BUCKET_NAME}
3532

3633
# If `tags` is uncommented then tags will be set at creation or update
3734
# time. During an update all other tags will be removed except the tags

examples/aws_lambda/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
rm -rf vendor && mkdir -p vendor/slack_bolt && cp -pr ../../slack_bolt/* vendor/slack_bolt/
3-
pip install python-lambda -U
3+
pip install git+https://github.com/nficano/python-lambda
44
lambda deploy \
55
--config-file aws_lambda_config.yaml \
6-
--requirements requirements.txt
6+
--requirements requirements.txt

examples/aws_lambda/deploy_lazy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
rm -rf slack_bolt && mkdir slack_bolt && cp -pr ../../slack_bolt/* slack_bolt/
3-
pip install python-lambda -U
3+
pip install git+https://github.com/nficano/python-lambda
44
lambda deploy \
55
--config-file lazy_aws_lambda_config.yaml \
66
--requirements requirements.txt
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
rm -rf slack_bolt && mkdir slack_bolt && cp -pr ../../slack_bolt/* slack_bolt/
3-
pip install python-lambda -U
3+
pip install git+https://github.com/nficano/python-lambda
44
lambda deploy \
55
--config-file aws_lambda_oauth_config.yaml \
66
--requirements requirements_oauth.txt

examples/aws_lambda/lazy_aws_lambda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ def handler(event, context):
4646
# export SLACK_BOT_TOKEN=xoxb-***
4747

4848
# rm -rf vendor && cp -pr ../../src/* vendor/
49-
# pip install python-lambda
50-
# lambda deploy --config-file aws_lambda_config.yaml --requirements requirements.txt
49+
# pip install git+https://github.com/nficano/python-lambda
50+
# lambda deploy --config-file lazy_aws_lambda_config.yaml --requirements requirements.txt

examples/aws_lambda/lazy_aws_lambda_config.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ function_name: bolt_py_function
44
handler: lazy_aws_lambda.handler
55
description: My first lambda function
66
runtime: python3.8
7-
# role: lambda_basic_execution
8-
# Have lambda:InvokeFunction & lambda:GetFunction in the allowed actions
9-
role: bolt_python_lambda_invocation
7+
role: bolt_python_lambda_invocation
108

119
# S3 upload requires appropriate role with s3:PutObject permission
1210
# (ex. basic_s3_upload), a destination bucket, and the key prefix
@@ -22,12 +20,11 @@ aws_secret_access_key:
2220
# timeout: 15
2321
# memory_size: 512
2422
# concurrency: 500
25-
#
2623

27-
# Experimental Environment variables
24+
# Lambda environment variables
2825
environment_variables:
29-
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
30-
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
26+
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
27+
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
3128

3229
# If `tags` is uncommented then tags will be set at creation or update
3330
# time. During an update all other tags will be removed except the tags

0 commit comments

Comments
 (0)