Skip to content

Instantly share code, notes, and snippets.

@moki9
Forked from numan/lc_boto.py
Last active August 29, 2015 14:15
Show Gist options
  • Save moki9/7a2752c48feef150b230 to your computer and use it in GitHub Desktop.
Save moki9/7a2752c48feef150b230 to your computer and use it in GitHub Desktop.
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