Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to know if I can reserve a number of Amazon Elastic IP addresses and assign them to instances started by Autoscale. So basically, when a new instance is started because a trigger has been triggered can I also set the API to look for a spare IP address and allocate it to the instance. I need to do this because the started instance will need to communicate to a server outside the cloud and get through a firewall which will only allow remote access from a predefined set of IP addresses. So i think i need to reserve some IPs, add them to my firewall settings then allocate them (automatically) when a new instance is started.

Any ideas?

share|improve this question
add comment

1 Answer

It is possible. First of all though, you only get 5 elastic IP addresses by default, to get more you need to ask Amazon Web Services and explain your use case. Once you have enough:

  1. Use the ec2-describe-addresses command line call. This will spit back what your elastic IP addresses are and what if any instance IDs are bound to them.

  2. Pick an open address, then use ec2-allocate-address to tie the instance to the IP addresses. When you shut down the instance make sure to remove it as well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.