When CodePipeline reaches the approval stage, it sends a notification to Amazon SNS, which triggers an AWS Lambda function (ApprovalRequester).
Write the Lambda function for approval requestsThis Lambda function is invoked by the SNS notification.
import os import json import logging import urllib.parse from base64 import b64decode from urllib.request import Request, urlopen from urllib.error import URLError, HTTPError # This is passed as a plain-text environment variable for ease of demonstration.
Write the Lambda function for handling the interactive message buttonThis Lambda function is invoked by API Gateway.
You have now created a Slack ChatOps solution using AWS CodeCommit, AWS CodePipeline, AWS Lambda, Amazon API Gateway, and Amazon Simple Notification Service.

Related Articles