This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import json | |
>>> import pprint | |
>>> from boto.sts import STSConnection | |
>>> s = STSConnection() | |
>>> d = s.decode_authorization_message('48hdmxfrx3...41DFkQ') # replace with your own string | |
>>> pprint.pprint(json.loads(d.decoded_message), indent=4) | |
{ u'allowed': False, | |
u'context': { u'action': u'iam:PassRole', | |
u'conditions': { u'items': []}, | |
u'principal': { u'arn': u'arn:aws:iam::334918212912:user/staging-bouncer', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Getting list of Availability Zones" | |
all_regions=$(aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]' | sort) | |
all_az=() | |
while read -r region; do | |
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort) | |
while read -r az; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libffi-dev libjemalloc-dev | |
apt-get -y install autoconf curl bzip2 | |
apt-get -y autoremove | |
apt-get -y clean | |
cd /usr/local/src | |
curl http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz |