42のWebhookから得た情報をDiscordのチャンネルに通知する API Gateway + Lambdaです。
- Serverless Framework >= v2.23.0
- AWS CLI
-
ssm作成
dev
aws ssm put-parameter \ --name "/ft-webhook-to-discord/dev/DISCORD_CHANNEL_ID" \ --value "<your_channel_id>" \ --type "SecureString" aws ssm put-parameter \ --name "/ft-webhook-to-discord/dev/DISCORD_BOT_TOKEN" \ --value "<your_bot_token>" \ --type "SecureString"
prod
aws ssm put-parameter \ --name "/ft-webhook-to-discord/prod/DISCORD_CHANNEL_ID" \ --value "<your_channel_id>" \ --type "SecureString" aws ssm put-parameter \ --name "/ft-webhook-to-discord/prod/DISCORD_BOT_TOKEN" \ --value "<your_bot_token>" \ --type "SecureString"
-
必要なパッケージをインストール
npm install
sls deploy --stage dev
sls deploy --stage prod
ローカル
pipenv shell
sls invoke local -f event -p events/data.json
dev環境
sls invoke -f event -s dev -p events/data.json