Skip to content

Instantly share code, notes, and snippets.

View harishletsgo's full-sized avatar

HP harishletsgo

  • 19:50 (UTC -04:00)
View GitHub Profile
@harishletsgo
harishletsgo / lambda.js
Created August 18, 2020 02:53 — forked from sammarks/lambda.js
Slack notifications from AWS Amplify
const https = require('https')
exports.handler = async (event) => {
const sns = event.Records[0].Sns.Message
let color = ''
let message = ''
if (sns.includes('build status is FAILED')) {
color = '#E52E59'
message = 'Release to My Company **production** failed.'
} else if (sns.includes('build status is SUCCEED')) {