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:
I hereby claim:
To claim this, I am signing this object:
#!/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) |
# Create a new key in an S3 bucket and specify you want to use | |
# the Reduced Redundancy Storage (RRS) option of S3 | |
import boto | |
# create connection to S3 service | |
s3 = boto.connect_s3() | |
# lookup my existing bucket | |
bucket = s3.lookup('mybucket') |
# Copy an existing key in an S3 bucket and specify you want to use | |
# the Reduced Redundancy Storage (RRS) option of S3 for the new copy | |
import boto | |
# create connection to S3 service | |
s3 = boto.connect_s3() | |
# lookup my existing bucket | |
bucket = s3.lookup('mybucket') |
# Convert an existing key in an S3 bucket that uses the STANDARD storage class | |
# to one using the REDUCED_REDUNDANCY storage class. This uses the S3 COPY | |
# command to copy the key back to the same bucket. The ACL is preserved. | |
import boto | |
# create connection to S3 service | |
s3 = boto.connect_s3() | |
# lookup my existing bucket | |
bucket = s3.lookup('mybucket') |
import boto | |
from boto.ec2.regioninfo import RegionInfo | |
reg = RegionInfo(name='ECC', endpoint='ecc.eucalyptus.com') | |
c = boto.connect_ec2(aws_access_key_id='<my euca access key>', aws_secret_access_key='<my euca secret key>', region=reg, port=8773, path='/services/Eucalyptus') | |
c.get_all_images() |
""" | |
IAM boto examples: | |
In this example, we create a group that allows read-only access | |
to a single SimpleDB domain. | |
""" | |
import boto | |
# | |
# First create a connection to the IAM service | |
# |
<ListGroupsResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> | |
<ListGroupsResult> | |
<IsTruncated>false</IsTruncated> | |
<Groups> | |
<member> | |
<GroupId>AGPAJ3O3FIPZF4F5NUDGO</GroupId> | |
<GroupName>Admin</GroupName> | |
<Path>/</Path> | |
<Arn>arn:aws:iam::963068290131:group/Admin</Arn> | |
</member> |
{u'list_groups_response': {u'list_groups_result': {u'groups': [{u'arn': u'arn:aws:iam::963068290131:group/Admin', | |
u'group_id': u'AGPAJ3O3FIPZF4F5NUDGO', | |
u'group_name': u'Admin', | |
u'path': u'/'}, | |
{u'arn': u'arn:aws:iam::963068290131:group/EC2-S3-Users', | |
u'group_id': u'AGPAJOINL5IR3W2DHU4MU', | |
u'group_name': u'EC2-S3-Users', | |
u'path': u'/'}, | |
{u'arn': u'arn:aws:iam::963068290131:group/SDB-ReadOnly', | |
u'group_id': u'AGPAIIKY4E53EEXTBKKY6', |
>>> r = iam.get_all_groups() | |
>>> r.groups | |
[{u'arn': u'arn:aws:iam::963068290131:group/Admin', | |
u'group_id': u'AGPAJ3O3FIPZF4F5NUDGO', | |
u'group_name': u'Admin', | |
u'path': u'/'}, | |
{u'arn': u'arn:aws:iam::963068290131:group/EC2-S3-Users', | |
u'group_id': u'AGPAJOINL5IR3W2DHU4MU', | |
u'group_name': u'EC2-S3-Users', | |
u'path': u'/'}, |