问题
Is it possible to associate an an elastic IP address with an ec2 instance using python boto? I'm trying to automate a deploy. I searched the api documentation in the ec2 section and found nothing.
回答1:
Don't know what documentation you were looking at, but it's in there:
http://boto.readthedocs.org/en/latest/ref/ec2.html#boto.ec2.address.Address.associate
associate(instance_id=None, network_interface_id=None, private_ip_address=None, allow_reassociation=False, dry_run=False)
Associate this Elastic IP address with a currently running instance. :see: boto.ec2.connection.EC2Connection.associate_address()
来源:https://stackoverflow.com/questions/20448428/boto-ec2-and-elastic-ips