jmoney / awshealth-to-slack

Lambda that posts AWS Health events to slack

Home Page:https://www.jmoney.dev/awshealth-to-slack/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awshealth-to-slack

Usage

There are three required environment variables needed to pass into the docker container during run.

Name Value
SLACK_WEBHOOK_URL The incoming webhook url for your slack workspace
LOCALE The locale of the language that should be posted. AWS usually sends multiple translations on an event
TZ timedatectl list-timezones selection of timezones

To execute the container a command like the following can be used:

docker run -rm \ 
    -e TZ=America/Chicago \
    -e LOCALE=en_US \
    -e SLACK_WEBHOOK_URL=<slack webhook> \
    -p 9000:8080 \
    ghcr.io/jmoney/awshealth-to-slack:latest

NOTE: To run this lambda in AWS one needs to copy copy the released image from github packages to a private ECR that lambda has permissions to read.

Run locally

docker-compose up --build

Will build and start the docker container. You can use any of the example payloads.

curl -s "http://localhost:9000/2015-03-31/functions/function/invocations" -d @samples/example_ELB.json | jq . 

Test integration with slack

If you want to see how it integrates with slack create an Incoming Webhook. Then in the docker-compose.yml set the incoming webhook url to the SLACK_WEBHOOK_URL environment variable.

About

Lambda that posts AWS Health events to slack

https://www.jmoney.dev/awshealth-to-slack/

License:Apache License 2.0


Languages

Language:JavaScript 89.5%Language:Dockerfile 10.5%