Reputation: 1941
I can't find how to allocate an elastic IP using Boto. I found how to assign it to an instance but not the allocation of the IP itself.
Can you show me how to do it? Thank you
Upvotes: 1
Views: 642
Reputation: 45846
In boto you would use:
import boto.ec2
ec2 = boto.ec2.connect_to_region('us-west-2') # or region of choice
eip = ec2.allocate_address()
print(eip.public_ip)
Upvotes: 2