Skip to content

Instantly share code, notes, and snippets.

View wheller's full-sized avatar
😁
Hacking on Infrastructure

Bill Heller wheller

😁
Hacking on Infrastructure
View GitHub Profile
@wheller
wheller / AWS-Policy-CDK-Lambda-Deploy.json
Created April 16, 2022 09:24
Permissions required to deploy a Lambda function via CDK. Replace "Lambda-Metrics-" with the prefix of your function, or remove it to grant unlimited function names.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CDKCloudFormationStacks",
"Effect": "Allow",
"Action": [
"cloudformation:DescribeStacks"
],
"Resource": "arn:aws:cloudformation:*:*:stack/CDKToolkit/*"
@wheller
wheller / CDK-Bootstrap-Policy.json
Last active June 2, 2023 14:39
An AWS Policy granting the access required to bootstrap the AWS CDK in any region.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CloudFormationStacks",
"Effect": "Allow",
"Action": [
"cloudformation:CreateChangeSet",
"cloudformation:DescribeChangeSet",
"cloudformation:DescribeStackEvents",
@wheller
wheller / boot.js
Last active April 4, 2017 22:53 — forked from jdx/boot.js
zero-downtime node.js app runner
// This script will boot app.js with the number of workers
// specified in WORKER_COUNT.
//
// The master will respond to SIGHUP, which will trigger
// restarting all the workers and reloading the app.
var fs = require('fs');
var cluster = require('cluster');
var workerCount = process.env.WORKER_COUNT || require('os').cpus().length || 2;
var script = process.argv[2] || 'index.js';