Read the full blog post on cloudonaut.io.
- Start by setting up an incoming webhook integration in your Slack workspace: https://my.slack.com/services/new/incoming-webhook/
- Select a channel or create a new one
- Click on Add Incoming WebHooks integration
- You are redirected to a new page where you can see your Webhook URL. Copy the value; you will need it soon.
- Clone or download this respository
- create a S3 bucket for SAM (replace
$UniqueSuffix
with e.g. your username):aws --region us-east-1 s3 mb s3://cw-to-slack-$UniqueSuffix
- Install Node.js dependencies:
npm install
- package the Lambda function code (replace
$UniqueSuffix
with e.g. your username):aws --region us-east-1 cloudformation package --s3-bucket cw-to-slack-$UniqueSuffix --template-file template.yml --output-template-file template.sam.yml
- Deploy the CloudFormation stack (replace
$WebhookURL
with your URL from Slack):aws --region us-east-1 cloudformation deploy --parameter-overrides "WebhookURL=$WebhookURL" --template-file template.sam.yml --stack-name cw-to-slack --capabilities CAPABILITY_IAM