Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am newmaniese on github.
  • I am newmaniese (https://keybase.io/newmaniese) on keybase.
  • I have a public key ASDCHpWzZZ5XFItjvG2XKxL8q5PZaPt1zc9xRA3FTKB5ZQo

To claim this, I am signing this object:

@newmaniese
newmaniese / aws_key_gen.sh
Last active March 23, 2016 18:12
One of our issues with AWS IAM users is that a super user needs to distribute keys and can't guarantee that a user will get to setting up their MFA. We force them to run this before granting the IAM user any more than "Onboarding" Permissions.
#! /bin/bash
WAITTIME=15
printf "This script will secure your profile in AWS, by\n"
printf " * creating keys that only you have\n"
printf " * removing the ones that you don't\n"
printf " * creating an Virtual MFA Device for authentication\n\n\n"
has_aws_installed=$(command -v aws)
<a href="http://pubads.g.doubleclick.net/gampad/jump?iu=/3468/ibs.det.newsletters/contests&sz=300x250|300x600&c={4_digit_random_number}&tile={order_of_ad}">
<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=/3468/ibs.det.newsletters/contests&sz=300x250|300x600&c={4_digit_random_number}&tile={order_of_ad}">
</a>
# prompt style and colors based on Steve Losh's Prose theme:
# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
#
# vcs_info modifications from Bart Trojanowski's zsh prompt:
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
#
# git untracked files modification from Brian Carper:
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
function virtualenv_info {
from boto.dynamodb2.fields import HashKey, RangeKey, KeysOnlyIndex, AllIndex, GlobalAllIndex
from boto.dynamodb2.table import Table
from boto.dynamodb2.types import NUMBER
from boto.dynamodb2.exceptions import ValidationException
import time
import uuid
import unittest
TABLE_NAME = "test_table"