Using (just recently) released official support for Go in lambda. Inspired by terranova's article.
- start with
dep ensure
Follow steps in aws manual:
GOOS=linux go build -o main
zip deployment.zip main
- upload this file in lambda function setup
- make sure you specify ENV variable
WEBHOOK_URL
with appropriate slack webhook URL - configure lambda trigger as SNS
AWS Healhcheck integration with slack, where Healthcheck sends notifications to the SNS which triggers the lambda.