Skip to content

Instantly share code, notes, and snippets.

@tomellis
Created August 15, 2012 12:30
Show Gist options
  • Save tomellis/3359717 to your computer and use it in GitHub Desktop.
Save tomellis/3359717 to your computer and use it in GitHub Desktop.
Eucalyptus Boto Example
#!/usr/bin/python
# Simple example to list all images in Eucalyptus via ec2-api
# Author: tom.ellis@eucalyptus.com
import boto
from boto.ec2.regioninfo import RegionInfo
# Credentials
access_key=""
secret_key=""
ec2_host=""
# Setup connection to Eucalyptus
conn = boto.connect_ec2(aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
is_secure=False,
region=RegionInfo(name="eucalyptus", endpoint=ec2_host),
port=8773,
path="/services/Eucalyptus")
# Run commands
images = conn.get_all_images()
for i in images:
print i.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment