I hereby claim:
- I am amosshapira on github.
- I am gliderflyer (https://keybase.io/gliderflyer) on keybase.
- I have a public key whose fingerprint is B816 AA12 28C0 C9BA ABFE AC73 B6D4 75F3 4DA6 32BE
To claim this, I am signing this object:
#!/bin/bash | |
build=alpha # define build ["stable", "beta", "alpha"] | |
disk=hvm # define disk backing ["pv", "hvm"] | |
if [ "x$1" = "x" ]; then | |
echo "Usage: $0 REGION"; exit 1 | |
fi | |
#### deprecated |
# sample input: | |
# some-single-word 06/04/2011 03/04/2017 | |
# this will sort on the date field on the third column | |
# The main trick is the appending of "-n" at the end, for some reason this does it | |
gsort -b -k 3.7,3.10 -k 3.4,3.5 -k 3.1,3.2 -n |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Redirect {www.,}company.co.uk web site to company.com, including SSL", | |
"Resources": { | |
"BucketCompanyCoUk": { | |
"Properties": { | |
"AccessControl": "PublicRead", | |
"BucketName": "company.co.uk", | |
"CorsConfiguration": { | |
"CorsRules": [ |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Redirect company.co.uk web site", | |
"Resources": { | |
"BucketCompanyCoUk": { | |
"Properties": { | |
"AccessControl": "PublicRead", | |
"BucketName": "company.co.uk", | |
"CorsConfiguration": { | |
"CorsRules": [ |
I hereby claim:
To claim this, I am signing this object:
# Extracted from the CloudFormation template.json below with: | |
# jq -r .Resources.RemoveExpiredObjectDeleteMarkerFunction.Properties.Code.ZipFile < template.json | |
import uuid | |
import httplib | |
import urlparse | |
import json | |
import boto3 | |
import botocore | |
import traceback |
import StringIO | |
import zipfile | |
import os | |
import os.path | |
def append_requests_module_code(zf): | |
requests_path = os.path.dirname(os.path.realpath(requests.__file__)) | |
for root, dirs, files in os.walk(requests_path): | |
ziproot = os.path.join('requests', root[len(requests_path)+1:]) | |
for fn in files: |
#!/bin/sh | |
# list cloudfomation stacks, filter out deleted stacks, | |
# print only stack names and status, align in nice columns | |
aws cloudformation list-stacks \ | |
--query 'StackSummaries[?StackStatus!=`DELETE_COMPLETE`].[StackName, StackStatus]' \ | |
--output text | \ | |
column -t |
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Creates auto scaling Elastic Search Cluster", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "Elastic Search node instance type", | |
"Type" : "String", | |
"Default" : "t2.small", |
#!/bin/bash | |
# Find self-owned AMI's which are not used by any instances or launch configurations in the default region. | |
comm -23 \ | |
<(aws ec2 describe-images --owner self --query 'Images[].[ImageId]' --output text | sort) \ | |
<((aws ec2 describe-instances --query 'Reservations[].Instances[].[ImageId]' --output text; | |
aws autoscaling describe-launch-configurations --query 'LaunchConfigurations[].[ImageId]' --output text) | sort -u) |