Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon AWS RDS: how to make the database Publicly Accessible to the internet

I have a database running inside AWS, region South America (Sao Paulo) that I could access with no problems from anywhere in the internet.

Then I wanted to create the same database on US East (North Virginia), but I wasn't able to access it from the internet. I compared creating a database on both regions to see the diferences and noticed the US East region doesn't list me any VPC to make it available to the internet.

Sout America Region

US East Region

I've been trying to create this VPC with subnet DB, etc, but no success! Anybody know what steps I need to do in order to make the database available to the internet?

Thanks!

like image 723
Vini.g.fer Avatar asked Nov 07 '13 17:11

Vini.g.fer


People also ask

What does publicly accessible mean in AWS RDS?

Description. Publicly accessible RDS instances allow any AWS user or anonymous user access to the data in the database.

Should RDS be publicly accessible?

It is recommended that RDS instance should not be publicly accessible to other services and resources in AWS. Public RDS instance means that other AWS users can access your database instance which can lead to misuse of the data.

How do I get an RDS public IP?

Open the Amazon RDS console. In the navigation pane, choose Databases. Choose the database instance for which you want to find the IP address. Choose the Connectivity & security tab.


1 Answers

First made sure that you have a DB-subnet group in my VPC with an associated VPC subnet in each of the availability regions, then

  1. Create two subnets within the VPC one each in a different AZ for DB use (take a note of the Subnet IDs).

  2. From RDS create a "Subnet Group" which you add the two subnets to one from each AZ so cover multi-az deployments. Now the "Choose a VPC" dropdown should be available when you create a new RDS instance.

for further info Go here please >>

ANSWER FOR YOUR SECOND QUESTION:

Q. Why there are only 251 IPs available when I created the subnet as 172.31.0.0/24?

A. When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's CIDR block can be the same as the VPC's CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest subnet (and VPC) you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses).

Important

AWS reserves both the first four and the last IP address in each subnet's CIDR block. They're not available for use. If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle. By default, you can create up to 20 subnets in a VPC. If you need more than 20 subnets, you can request more by going to 'Request to Increase Amazon VPC Limits'

for further info GO here please.

like image 91
Shivanshu Avatar answered Sep 24 '22 13:09

Shivanshu