Skip to content

Instantly share code, notes, and snippets.

@numan
Created July 13, 2011 21:43
Show Gist options
  • Save numan/1081407 to your computer and use it in GitHub Desktop.
Save numan/1081407 to your computer and use it in GitHub Desktop.
Setting up a launch configuration using boto
from boto.ec2.autoscale import AutoScaleConnection
from boto.ec2.autoscale import LaunchConfiguration
conn_as = AutoScaleConnection(AWS_ACCESS_KEY, AWS_SECRET_KEY)
#For a complete list of options see http://boto.cloudhackers.com/ref/ec2.html#boto.ec2.autoscale.launchconfig.LaunchConfiguration
lc = LaunchConfiguration(name='my-launch-config-name', image_id='ami-123456',
key_name='webserver-access-key',
security_groups=['webserver-security-group'],
instance_type='t1.micro',
instance_monitoring=True)
conn_as.create_launch_configuration(lc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment