Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using static IP address with Amazon EC2

I want to use the Amazon Web Service free micro-instance for my different projects for testing and personal purpose. But I required some static-public IP on which I can run my server.

Is that possible? From where I can buy just IP and use it with my AWS?

like image 478
coure2011 Avatar asked Sep 09 '25 19:09

coure2011


2 Answers

EC2 Elastic IP Addresses

Elastic IPs are tied to an account, not an instance.

like image 199
Rick Button Avatar answered Sep 13 '25 15:09

Rick Button


You need to look at AWS VPC for this.

Whilst VPC is free outside of the usual instance pricing, it doesn't work with Micro instances (the cheapest ones).

When not using VPC, you're assigned IP addresses through DHCP. When the DHCP lease expires, or you restart, your IP is released back to the pool.

VPC lets you use private IP addressing, you can use it with Elastic IPs and is much easier to integrate with a physical infrastructure setup.

If you're only testing/investigating AWS and have little or no budget to use anything other than a Micro instance, I'd just suck it up and deal with the changing of IPs.

If you've got a budget that lets you use instances other than Micro, then go for VPC.

Also, if you're doing more than testing/investigating I'd recommend starting with VPC straight away as trying to migrate from a non VPC to a VPC infrastructure is a massive PITA.

like image 40
iamgeef Avatar answered Sep 13 '25 16:09

iamgeef