毎月雑談会の調整さんをSlack通知するリマインダーを作りました
毎月雑談会の調整さんをSlack通知するリマインダーを作りました | DevelopersIO
aws sam install
https://docs.aws.amazon.com/ja_jp/serverless-application-model/latest/developerguide/install-sam-cli.html
試しに作る
code: start
sam init --runtime python3.9 --name Chouseisan-reminder
Which template source would you like to use?
1 - AWS Quick Start Templates
2 - Custom Template Location
Choice: 1
Choose an AWS Quick Start application template
1 - Hello World Example
2 - Hello World Example with Powertools for AWS Lambda
3 - Infrastructure event management
4 - Multi-step workflow
5 - Lambda EFS example
6 - Serverless Connector Hello World Example
7 - Multi-step workflow with Connectors
Template: 1
Based on your selections, the only Package type available is Zip.
We will proceed to selecting the Package type as Zip.
Based on your selections, the only dependency manager available is pip.
We will proceed copying the template using pip.
Would you like to enable X-Ray tracing on the function(s) in your application? y/N: n
Would you like to enable monitoring using CloudWatch Application Insights?
For more info, please view https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-application-insights.html y/N: n
Would you like to set Structured Logging in JSON format on your Lambda functions? y/N: n
Cloning from https://github.com/aws/aws-sam-cli-app-templates (process may take a moment)
-----------------------
Generating application:
-----------------------
Name: Chouseisan-reminder
Runtime: python3.9
Architectures: x86_64
Dependency Manager: pip
Application Template: hello-world
Output Directory: .
Configuration file: Chouseisan-reminder/samconfig.toml
Next steps can be found in the README file at Chouseisan-reminder/README.md
Commands you can use next
=========================
* Create pipeline: cd Chouseisan-reminder && sam pipeline init --bootstrap
* Validate SAM template: cd Chouseisan-reminder && sam validate
* Test Function in the Cloud: cd Chouseisan-reminder && sam sync --stack-name {stack-name} --watch
https://api.slack.com/apps
https://gyazo.com/4d206cb320089bf32914bcf5ee22b547
Incoming Webhookの設定
https://gyazo.com/29c7d2973edb96225f4ed7e21468188e
SSMパラメータの設定
https://gyazo.com/5be8bde3aa6c80047758f56b8b293ee7
TODO
SAMを使わないコンパネデプロイ
LambdaでPython importを解決
この辺?https://www.gluegent.com/blog/2022/11/aws-lambda-layers.html
(できれば)imcoming webhook→Slack App移行