AWS lambda上で動く、Kotlin製SlackBotです。
./gradlew build
aws lambda create-function --region ap-northeast-1 --function-name <ファンクション名> --zip-file fileb://build/distributions/aws-lambda-kotlin.zip --role arn:aws:iam::<AWSアカウントID>:role/lambda_basic_execution --handler net.nocono.Main::handler --runtime java8 --timeout 15 --memory-size 512
aws lambda update-function-code --region ap-northeast-1 --function-name <ファンクション名> --zip-file fileb://build/distributions/aws-lambda-kotlin.zip
SlackのOutbound Webhookから来るデータは application/x-www-form-urlencoded のPOSTであるため、 API Gateway でJSONにマッピングする必要があります。
AWS API GatewayでContent-Type:application/x-www-form-urlencoded のPOSTデータを受け取り JSONに変換する - Qiita