AWS: Unused Elastic IP charges

2019-01-20 13:24发布

I had 2 elastic IPs assigned to my account for use with 2 different instances. For some reason, I had to take down my instance(terminate) which unassigned the IP assigned to it and made it free on my account but not automatically released (as mentioned in the docs).

I'm wondering whether this unassigned Elastic IP will cost me even if i don't re-assign it to any instance. I know there is no harm in releasing the IP(which I did) but this is a topic I couldn't find an answer. There are few posts I found on google that do talk about reducing AWS bills and a mention of pro-rata charges for >1 elastic IPs to an instance but nowhere did I find about the charges for an unassigned Elastic IP.

P.S: I know networking questions are off topic. But this one doesn't essentially talk about a networking concept. This one definitely doesn't fit in ServerFault or SuperUser. BTW, I did follow Practical Cloud Computing, hope it will move to next phase soon.

3条回答
爷的心禁止访问
2楼-- · 2019-01-20 13:29

According to AWS

You will be charged

1) $0.005 per additional IP address associated with a running instance per hour on a pro rata basis

$0.005 per Elastic IP address not associated with a running instance per hour on a pro rata basis

$0.00 per Elastic IP address remap for the first 100 remaps per month

$0.10 per Elastic IP address remap for additional remaps over 100 per month

Amazon will charge you for each EIP that you reserve and do not use

Note:It depand upon the Region

Region wise pricing : https://aws.amazon.com/ec2/pricing/on-demand/#Elastic_IP_Addresses

2)You will be charged if you ever remap an EIP more than 100 times in a month

3)You will be charged for each additional EIP associated with that instance per hour on a pro rata basis. Additional EIPs are only available in Amazon VPC.

You will not be charged(Free)

1)Elastic IPs are totally free, as long as they are being used by an instance

查看更多
该账号已被封号
3楼-- · 2019-01-20 13:37

Elastic IP

According to the answer from Shibashis you will be charged:

$0.005 x 24hr x 30 days = $3.60 / months / per Elastic IP address not associated with

DynamicURL

You may consider other option that does not require for an assignment of an Elastic IP.
There is a service called DynamicURL that change IP Address on A of your domain dynamically.

https://ipv4.cloudns.net/api/dynamicURL/?q=XXX...

Some services are free. You need only to set NAME SERVER of your domain.
Following are the example script to run each time an instance is started:

Wget

wget -q --read-timeout=0.0 --waitretry=5 --tries=400 \\
--background https://ipv4.cloudns.net/api/dynamicURL/?q=XXX... 

php

<?php file_get_contents('https://ipv4.cloudns.net/api/dynamicURL/?q=XXX...'); ?>

Python

#!/usr/bin/python
import urllib
page = urllib.urlopen("https://ipv4.cloudns.net/api/dynamicURL/?q=XXX...");
page.close();

Perl

#!/usr/bin/perl
my $uri = 'https://ipv4.cloudns.net/api/dynamicURL/?q=XXX...';

use IO::Socket;
my ($domain, $path) = $uri =~ m{^https://([^/]*)(.*)};
$path = '/' unless length $path;
my $sock = IO::Socket::INET->new(
    Proto => 'tcp',
    PeerAddr => $domain,
    PeerPort => '80',
) or die "can't connect to $domain\n";
my $CRLF = "\x{0d}\x{0a}";
print $sock "GET $path HTTP/1.0$CRLF$CRLF";
close($sock);

If you are behind proxy and your real IP is set in the header X-Forwarded-For you need to add &proxy=1 at the end of the DynamicURL.

查看更多
相关推荐>>
4楼-- · 2019-01-20 13:47

You will be charged "$0.005 per Elastic IP address not associated with a running instance per hour on a pro rata basis"

Please find the associated documentation about the pricing at https://aws.amazon.com/ec2/pricing/

查看更多
登录 后发表回答