How to setup an Elastic IP that is free of charge?

0

Hello, I'm trying to setup an Elastic IP on my EC2 instance with the objective of having a static IP and I'm following these two articles:

(1) https://repost.aws/questions/QUUC7uf_inRZeiTVh5AwpPyQ#COoZoHOySnS9OpC2H5bYuzeQ

(2) https://repost.aws/knowledge-center/elastic-ip-charges

But I still have some doubts.

In the first place, I'm being charged for the service, I can see this in my cost explorer. I used an Elastic IP for a few days and my cost this month grew up 624% related to my usual cost per month.

On the othar hand, according to the article on the knowledge center (2), if I have the following setup, it should be free of charge:

  • The Elastic IP address is associated with an EC2 instance.
    • I associated the Elastic IP with my only already running instance.
  • The instance associated with the Elastic IP address is running.
    • The instance is already running.
  • The instance has only one Elastic IP address attached to it.
    • The instance has only one Elastic IP attached to it, I have only one Elastic IP.
  • The Elastic IP address is associated with an attached network interface. For more information, see Network interface basics.
    • The Elastic IP is associated with the instance, if I associate it with the interface it will disassociate with the instance, which is the first requirement.

But, however, I don't exactly understand how can I have the Elastic IP associated with the instance and with the interface at the same time. I can only associate the Elastic IP with one resource, the instance OR the network interface, but I can't have it associated with both. Only one option can be selected

Also, I see that the configuration summary of the Elastic IP is the same no matter if I associate it with the instance or with the network interface. Elastic IP summary

The network interface that I associate the Elastic IP with, is the same interface that is associated with the instance in question.

Finally, I am also aware of the fact that from the 1st of february this year (2024), there IS some charge per hour for the public IPv4, as this article points out.

So in conclusion,

  • Am I doing this wrong?
  • How to correctly associate the Elastic IP (do I associate it with the instance or with the interface)?
  • And finally, if I have the instance running, and I have associated the Elastic IP with the network interface, why am I being charged?

Thanks in advance for any insight on the question!

PS/PD: Here is a snapshot of one day (11/03/24) of my cost and usage graph as reference for the question in the comments. Which one should be representing the cost of the Elastic IP? Tue-11

Bore
asked a month ago108 views
3 Answers
4
Accepted Answer

Hello.

Am I doing this wrong?

I think your method of setting the Elasitc IP address is correct.

How to correctly associate the Elastic IP (do I associate it with the instance or with the interface)?

When assigned to an EC2 instance, ElasitcIP is assigned to the primary ENI.

And finally, if I have the instance running, and I have associated the Elastic IP with the network interface, why am I being charged?

I think the charges are being incurred because AWS has started charging for public IPv4 since February.
https://aws.amazon.com/jp/blogs/aws/new-aws-public-ipv4-address-charge-public-ip-insights/

With the introduction of charges for public IPv4 addresses, you will now be charged just for owning an Elasitc IP address.
This means that you will be billed even if Elasitc IP is configured on EC2.

If your AWS account was created less than a year ago, you have 750 free hours per month for 12 months.
https://aws.amazon.com/about-aws/whats-new/2024/02/aws-free-tier-750-hours-free-public-ipv4-addresses/?nc1=h_ls

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
shibata
reviewed a month ago
profile pictureAWS
EXPERT
reviewed a month ago
  • Hello Riku Kobayashi, and thank you for answering on my question. I still don't understand why am I being charged so much, when the IPv4 are at a price of $0,005/h, this should be like $0,12 per day per IP. Am I right?

  • Please check AWS Cost Explorer or your bill to see which services have increased costs, as this could be due to a public IPv4 address other than ElasitcIP or other factors. https://docs.aws.amazon.com/cost-management/latest/userguide/ce-what-is.html

  • Alright, I updated my question and included a snapshot of my costs and usage for the 11 of march. Can you please point me out which of the elements represents the Elastic IP service cost?

  • As far as I can see from the image, it looks like there is a charge for EC2 rather than an IP address charge. As @Steve_M says, the cost of the public IP address is included in the VPC price.

  • Thanks for the updates, Riku! I have it under control now ;-)

1

Here is a snapshot of one day (11/03/24) of my cost and usage graph as reference for the question in the comments. Which one should be representing the cost of the Elastic IP?

As you know, each Public IPv4 address costs $0.005 per hour, meaning one day evaluates to $0.12 - this is the VPC item in your screengrab.

EC2 Instances charges are for the EC2 instances themselves, and EC2-Other is for other EC2-related items like EBS volumes, NAT Gateways, etc.

profile picture
EXPERT
Steve_M
answered a month ago
  • Hey Steve, thanks, this clarifies it!

0

you can to avail elastic ips free of charge aws charged for elastic ips how ever you can avail dynamic ip free of charge

profile picture
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions