Skip to content

Instantly share code, notes, and snippets.

Avatar

Aan Kunaifi MrCoro

  • indonesia
View GitHub Profile
View oke.js
const p = require('phin');
// input your slack webhook
const reqURL = `https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxxxxxxxxxxx`;
async function notifySlack(instanceInfo) {
const message = {
'channel': 'aws-alarm',
'username': 'AWS_State_Reporting_Bot',
View contoh.js
// EC2 event data json
{
"version": "0",
"id": "9f8ef89a-bffc-7f81-dab1-596bd6c2d684",
"detail-type": "EC2 Instance State-change Notification",
"source": "aws.ec2",
"account": "465732654097",
"time": "2022-03-29T09:19:21Z",
"region": "ap-southeast-2",
"resources": [