
Let’s call it “cloudwatch-to-slack.”Ĭhoose the region of the Lambda function.ĪWS_ROLE=”arn:aws:iam::123456789123:role/lambda_exec_role”Ĭopy the arn id from the second step here.įill in the AWS Access Key and Secret with your keys from the first step. The name of your function which will be declared in your AWS Lambda function page. Download the Cloudwatch logo from the link here Once you create a webhook, choose a channel, then post notifications, create a username(the title for messages) and, of course, add a nice picture. That variable you should fill with the Slack Incoming Webhook create a new one for CloudWatch on that page for your organizationįollow the practice of using one hook for one specific service. env file and fill in the environment variables. Especially for that guide, we contributed significantly in the repository to get a better configuration process. To deploy the AWS Lambda function, you need to clone the repository and have Node.js installed on your local machine. We will use it in step 3 during deployment of the Lambda function. The Role will be used by your Lambda function and requires permission to do certain things.įind AWSLambdaBasicExecutionRole and select it.įinally, type a role name, such as “cloudwatch-to-slack-role,” click on the newly created role in the list and copy the ARN name. Choose your user, then go to the Security Credentials tab and click Create Access Key.Ĭopy the AWS Access Key and Secret we will use them during configuring deployment of Lambda Function. If you already have your AWS Access Key and Secret, you can skip this step. There are a few steps we will need to go through to make this happen:

For those of you who would like to see all in action, please watch our video tutorial.

This article reveals the secrets you should know to set up the alarms you need in five minutes. But, if you worked with AWS before you no doubt noticed that the interface and certain functions are a far cry from “user friendly,” which means that sending a notification with alarms to Slack not a trivial task. AWS CloudWatch doesn’t only give you access to metrics, however, it also creates alarms for specific cases. If you host your infrastructure on AWS, the only one way to get the full metrics of your used services is to use CloudWatch. If you worry about your customers, it’s better to be notified when something goes wrong then be in the dark. Alarm and monitoring systems are a key part of mature products and applications.
