Using static IP address with Amazon EC2
Asked Answered
H

5

26

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?

Hexa answered 6/3, 2012 at 5:49 Comment(2)
Amazon has Elastic IP Addresses like Rick says, and they're also free. You don't need to purchase any. However, if they are not assigned to a machine then you will be charged a very small fee for not using them.Businesslike
Answer anyone? I'd also like to have a static public IP. Elastic IP is not a solution, because it can only be applied to running instances, so it always happens after my network services have already started, causing them to rebind from a DHCP address to Elastic IP. Is there a workaround?Hardunn
S
15

EC2 Elastic IP Addresses

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

Sudatory answered 6/3, 2012 at 5:50 Comment(1)
And be careful to let them tied to an instance otherwise Amazon charges you for unused addresses.Wilek
S
8

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.

Salomesalomi answered 22/10, 2013 at 23:2 Comment(2)
Elastic IPs don't require a VPC and afaik they never have...there's no need for a VPC given the asker's quesitonAgronomy
Yes there is, private static IPs in a VPC are free, elastic IPs are not unless you plan to keep the instance running all the time.Dare
K
4

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.

Keikokeil answered 12/3, 2012 at 5:53 Comment(4)
Elastic IP is an external world facing IP. I think the question here is how to assign static internal IP to the amazon ec2 machine, so that any application that has this requirement always sees a constant one.Gans
The question was how to buy a elastic ip, and replied that you get 5 ip's free.Keikokeil
Quote from amazon "You can have one Elastic IP (EIP) address associated with a running instance at no charge."Uella
Quote from Amazon: "By default, all accounts are limited to 5 Elastic IP addresses. If you need more than 5 Elastic IP addresses, we ask that you apply for your limit to be raised. We will ask you to think through your use case and help us understand your need for additional addresses. You can apply for more Elastic IP addresses here. In order to help ensure our customers are efficiently using the Elastic IP addresses that they have associated with their account, we impose the $.01/hr charge when these IP addresses are not mapped to an instance."Buchbinder
I
0

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

Intrauterine answered 20/8, 2014 at 7:32 Comment(0)
G
-1

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)

Gilges answered 3/4, 2014 at 5:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.