Skip to content

Instantly share code, notes, and snippets.

console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@billhathaway
billhathaway / main.go
Last active August 29, 2015 14:22 — forked from nfisher/main.go
package main
// This command will allow you to provision, delete, describe, or estimate the cost of the specified CloudFormation template.
//
// Once compiled use the -help flag for details.
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
// Package lambda helps create workers that run in AWS’ Lambda service.
// The Lambda service is designed to run Node.js programs, so we have a very thin
// Node.js wrapper which is essentially an adapter between our Go worker programs
// and Lambda. Lambda runs our Node.js wrapper/adapter which then in turn runs
// our Go worker programs as child processes, communicating with them via stdio pipes
// and Unix exit codes.
//
// The interaction between the Lambda wrapper and our Go programs works like this:
//
// * The Node.js function is invoked by Lambda. Lambda passes an `event` parameter to