简体   繁体   中英

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?

EC2 Elastic IP Addresses

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

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.

For every AWS account, 5 free elastic ips are provided. You have to just allocate them to required instance. But make sure that the allocate address(newly created elastic ip) in in use, because you will billed if the Elastic ip is not in use.

On the whole pricing delima: When you come to think of it, there is a limited amount of static IPs so there must some pricing (supply and demand). This pricing is two fold: 1) for upto a limited number (5 per account) you don't have to pay. 2) if you created one you need to use it if you don't you'll be billed (to prevent every user to get 5 static IPs)

Looks like they have configured ARP statically so you can only use the IP address on an instance that was bound to that instance through the EC2 management console.

I just configured one of my instances to use a static IP address other than the one assigned through the management console and rebooted the instance.

I'm still receiving ARP responses on the old address but not receiving ARP responses on the new address at all.

Unfortunately for me, I have a not responding instance (NFS File Server) stuck in a stopping state while I attempt to terminate it. The IP Address bound to that instance cannot be re-assigned to a replacement instance so now I have to reconfigure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM