Private RDS instance getting billed for a public IPv4 address?

,

For context, this is a brand new AWS account using free tier. I’m running an EC2 instance that stores data in an RDS instance. The EC2 instance does not have an elastic IP associated with it, but is pointing to a subdomain (used NGINX and ssl certification). I know it’s not the EC2 instance, as AWS even says:

If you are an existing or new AWS Free Tier customer for Amazon EC2, you will get 750 hours public IPv4 address usage per month free when launching any EC2 instance with a public IPv4 address.

But my RDS instance is getting hit with the $0.005 per In-use public IPv4 address per hour. But it doesn’t really make sense to me, since i’ve followed every measure I can think of to make sure it is private:

  • It is set to Not publicly accessible
  • It is in a different subnet group than my EC2 instance (same VPC)
  • The RDS instance subnets do not route to an Internet Gateway
  • It only has one inbound rule and one outbound rule - it permits traffic to and from my EC2 instance
  • It does not share any security groups with the EC2 instance
  • The only way to connect to it is by SSH tunneling on my EC2 instance

Am I incorrect in believing that this RDS instance should be private, and NOT using a public IPv4 address? Thanks in advance for any advice / help you guys can offer

Hi there,

I found a few docs that may be helpful to determine these charges:

  1. New – AWS Public IPv4 Address Charge + Public IP Insights

  2. Identify and optimize public IPv4 address usage on AWS

  3. Whats New Blog -AWS Free Tier

If these don’t help you troubleshoot, I recommend reaching out to our Billing & Accounts team who can help clarify: http://go.aws/support-center.

- Elle G.

I just set up the VPC IP address manager and the only public IP type associated with my VPC is my EC2 public IP.

That IP is definitely not incurring charges. I can see in the billing by services that my EC2 free tier IP has been In use for 128 hours at $0.00 per hour.

Hello,

Our Billing team would be the best to ask, since they have visibility into your account and usage details. You can open a case with them for clarity, in our Support Center.

- Ann D.

What does the detail of the billing screen say you’re being billed for? You can filter it for the current month and break down by service in there to see the line items

From the AWS Billing > Bills console:

Virtual Private Cloud → USD $0.27

  • US East (Ohio) → USD $0.27
    • Amazon Virtual Private Cloud Public IPv4 Addresses → USD $0.27
      • $0.00 per In-use public IPv4 address per hour for EC2 Free Tier - 128.134 Hrs → USD $0.27
      • $0.005 per In-use public IPv4 address per hour - 54.513 Hrs → USD 0.27

You should be able to see the ENI in public IP insights under the VPC IP Address manager?

Did you create a new custom VPC with a private subnet to deploy the RDS into? You should be able to see on the RDS node it’ll tell you which subnet it is and if it has a public IP

I can see that I have two network interfaces in my VPC: one for the RDS instance and one for the EC2 instance. The EC2 instance’s ENI has a public IPv4 address, but the RDS instance’s ENI does not.

When I set up the RDS instance, I didn’t create a new custom VPC. Because I chose to connect it to the EC2 resource at creation, it was connected to existing VPC where my EC2 instance resides. I was under the impression this was good practice so that you can block all traffic to the database except for instances within the VPC. In the VPC I did create a new private subnet group for the RDS instance.

On the RDS node, I can see each subnet in the group has the auto-assign public IPv4 address option set to “No.” This setting is the same for the other two subnets in the RDS subnet group (i have a subnet for us-east-2a, 2b, and 2c).

All sounds like it checks out, you haven’t deployed a NAT instance or anything? If you copy the ENI names from the Public IP insights you should be able to look them up in the EC2 console under network interfaces to see what if anything they are attached, or not attached to, as you get charged for that too

Hmm, I’m not seeing any deployed NAT Gateways at all either. Thanks for your help, I’ll probably just consult AWS Support because I really don’t see where AWS thinks this public IP is coming from lol

They charge you for elastic IPs when they’re not attached to the network interface of a running machine. Do you have any EIPs sitting around?

Hey, thanks for the suggestion but I don’t have any elastic IPs setup on this account. That was my initial thought too

Check VPC settings, maybe RDS instance is still exposed to public subnet?

Could it be in a different region? Maybe your setup is in us-east-1 but the eip is sitting idle in us-east-2?