top of page

Domain SSL Certificate Expiry Notifications using Slack

  • Writer: Subhasish Sahu
    Subhasish Sahu
  • May 28, 2021
  • 1 min read

What all we need :





  • Slack – One Platform for your team and work.

  • AWS Lambda – It runs your code without provisioning or managing servers. The Lambda console provides a code editor for non-compiled languages that lets you modify and test code quickly.

  • AWS Cloudwatch – Cloudwatch events are used to trigger Lambda functions at scheduled intervals.

We need to download and install slack


1) DownLoad and Install Slack


ree

ree

Create a Channel in Slack and don't make it private.


ree

Channel is created



ree

Goto App Section and integrate WebHook


ree


ree

Click on Add to Slack


ree



ree


ree


ree




ree

Copy the Webhook URL and note it down.



Click on Save Settings


ree


2) Create Lamda Function



ree

Click on Create Function


ree

Click on Create Function


We will use python:


ree




ree

ree


ree

Paste the script from below attachment

Script :


To test it manually, we need to modify the script:


ree


Click on "Configure test event " under Test option as shown below



ree

Create an event as below

ree

ree

Click on Create and Run the test.You will get the slack notification


ree

3) Configure Cloudwatch Event


Click on Rules

ree

ree

Set Schedule and Targets


ree

ree

ree

As per the Schedule, the Lambda Function would be triggered and you will get slack notification


ree

Comments


bottom of page