I hereby claim:
- I am garnaat on github.
- I am garnaat (https://keybase.io/garnaat) on keybase.
- I have a public key whose fingerprint is A6C2 33BA 6313 1605 6E70 1EE4 F2E1 4005 8CC6 80A4
To claim this, I am signing this object:
import skew | |
for instance in skew.scan('arn:aws:ec2:*:*:instance/*'): | |
if not instance.tags: | |
print('%s is untagged' % instance.arn) |
import skew | |
total_size = 0 | |
total_volumes = 0 | |
for volume in skew.scan('arn:aws:ec2:*:*:volume/*'): | |
if not volume.data['Attachments']: | |
total_volumes += 1 | |
total_size += volume.data['Size'] | |
print('%s: %dGB' % (volume.arn, volume.data['Size'])) |
import skew | |
# Add whitelisted CIDR blocks here, e.g. 192.168.1.1/32. | |
# Any addresses not in this list will be flagged. | |
whitelist = [] | |
for secgrp in skew.scan('arn:aws:ec2:*:*:security-group/*'): | |
for ipperms in secgrp.data['IpPermissions']: | |
for ip in ipperms['IpRanges']: | |
if ip['CidrIp'] not in whitelist: |
#!/usr/bin/env python | |
import requests | |
import time | |
import json | |
import click | |
@click.command() | |
@click.option('--name', prompt='metric name', | |
help='the name of the custom metric', required=True) |
#!/usr/bin/env python | |
""" | |
Launch an AWS Web Console. | |
Usage: | |
awsconsole launch --role=<role_arn> [--profile=<profile_name>] | |
Commands: | |
launch - Launch the AWS Console in your default web browser with | |
the specified credentials. The console will be authenticated |
I hereby claim:
To claim this, I am signing this object:
aws ec2 describe-instances --filters Name=tag-key,Values=component --query 'Reservations[].Instances[].Tags' |
import boto.ec2 | |
ec2con = ec2.connect_to_region("us-west-1") | |
snap = ec2con.get_all_snapshots(['snap-3b82a650'])[0] | |
print(snap.id) | |
print(snap.volume_id) | |
print(snap.status) | |
print(snap.start_time) | |
print(snap.owner_id) | |
print(snap.volume_size) |
import botocore.session | |
session = botocore.session.get_session() | |
ec2 = session.get_service('ec2') | |
operation = ec2.get_operation('DescribeInstances') | |
endpoint = ec2.get_endpoint('us-west-2') | |
# Calling with no parameters will return all instances | |
# associated with this account in this region. | |
http_response, data = operation.call(endpoint) | |
# You could also limit the results to only certain |
{ | |
"Statement": [ | |
{ | |
"Sid": "Stmt1363151440055", | |
"Action": [ | |
"iam:ListInstanceProfiles", | |
"iam:ListRoles", | |
"iam:PassRole" | |
], | |
"Effect": "Allow", |