Skip to content

Instantly share code, notes, and snippets.

Tracy Phillips tracphil

Block or report user

Report or block tracphil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View commit-message-guidelines.md

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
override.vm.box = "dummy"
@tracphil
tracphil / export_values.py
Created Oct 1, 2019 — forked from svrist/export_values.py
export cloudformation outputs as more simple json
View export_values.py
from __future__ import division, print_function, unicode_literals
import json
import re
import boto3
def main(stack):
cf = boto3.client('cloudformation')
@tracphil
tracphil / decode_aws_auth_fail_msg.sh
Created Sep 13, 2019 — forked from slmingol/decode_aws_auth_fail_msg.sh
Use this when Amazon gives you an "Encoded authorization failure message" and you need to turn it into something readable. If you only get a request id... you're out of luck.
View decode_aws_auth_fail_msg.sh
#!/bin/bash
# REF: https://gist.github.com/xiongchiamiov/b0ef0251813625307371d0e11e131759#file-why-sh
# REF: https://bcb.github.io/pipe-jq-to-less
function decode-authorization-failure-message {
if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then
cat <<'EOT'
Usage: decode-authorization-failure-message <message>
@tracphil
tracphil / Autotag Role
Created Jul 23, 2019 — forked from jmturwy/Autotag Role
AWS - AutoTag Snapshot's from Cloudwatch
View Autotag Role
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"cloudtrail:LookupEvents"
],
"Resource": [
"*"
],
@tracphil
tracphil / tag-vols-snaps.py
Created Jul 2, 2019 — forked from danpritts/tag-vols-snaps.py
Automatically tag EC2 snapshots and volumes based on their attached AMIs/instances
View tag-vols-snaps.py
# most credit to the original: https://gist.github.com/brandond/6b4d22eaefbd66895f230f68f27ee586
# Tag snapshots based on their associated AMI and volumes based on attached instance.
# format:
# (AMI:db5|db5) /dev/sda1 (1/4)
# (AMI:db5|db5) /dev/sdb (2/4)
# Best practice: create IAM user
# Simplest privilege to get it to work with reasonable security: use predefined policy "ReadOnlyAccess"
@tracphil
tracphil / AWSRegionsAndAZs.md
Created Jun 21, 2019
List of AWS availability zones for each AWS region
View AWSRegionsAndAZs.md
AWS region code AWS region name Number of AZs AZ names
us-east-1 Virginia 4 us-east-1a, us-east-1b, us-east-1c, us-east-1e
us-west-1 N. California 2 us-west-1a, us-west-1b
us-west-2 Oregon 3 us-west-2a, us-west-2b, us-west-2c
eu-west-1 Ireland 3 eu-west-1a, eu-west-1b, eu-west-1c
eu-central-1 Frankfurt 2 eu-central-1a, eu-central-1b
ap-southeast-1 Singapore 2 ap-southeast-1a, ap-southeast-1b
ap-southeast-2 Sydney 2 ap-southeast-2a, ap-southeast-2b, ap-southeast-2c
ap-northeast-1 Tokyo 2 ap-northeast-1a, ap-nort
@tracphil
tracphil / README.md
Created Jun 20, 2019 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


View nginx-cloudfront-ip.sls
nginx:
pkg:
- installed
service.running:
- watch:
- file: /etc/nginx/nginx.conf
- cmd: /etc/nginx/cloudfront.conf
/etc/aws/ip-ranges.json:
file.managed:
You can’t perform that action at this time.