Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Connect to an Amazon Aurora DB cluster from outside a VPC

by | Aug 13, 2021

Wondering how to connect to an Amazon Aurora DB cluster from outside a VPC? We can help you.

Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.

Today, let us see how our Support Techs perform this task.


How to connect to an Amazon Aurora DB cluster from outside a VPC?

In order to connect to an Amazon Aurora DB cluster directly from outside the VPC, the instances in the cluster must meet the below requirements:

  • The DB instance must have a public IP address
  • The DB instance must be running in a publicly accessible subnet

Also, configuring your DB instance so that it can be connected to from outside a VPC, you can also secure the connections using Transport Layer Security (TLS), formerly known as Secure Sockets Layer (SSL).

Today, let us see the steps followed by our Support techs to perform this task.

Set Publicly Accessible setting of DB instance to Yes

The Publicly Accessible setting for an Amazon Relational Database Service (Amazon RDS) DB instance controls the assignment of a Public IP address to the DB instance.

If this is set to No, the DB instance does not have a Public IP address.
If this is set to Yes, the DB instance has both Public and Private IP addresses.

To change the Publicly Accessible setting of the DB instance to Yes, follow below steps:

1.Firstly, open the Amazon RDS console.

2.Choose Databases from the navigation pane, and then choose the DB instance.

3.Choose Modify.

4.Under Connectivity, extend the Additional configuration section, and then choose Publicly accessible.

5.Then, choose Continue.

6.Finally, choose Modify DB Instance


Run DB instance in a public subnet

A public subnet is a subnet that is associated with a route table which has a route to internet gateway, typically the default route,

This route enables the DB instances in a subnet to communicate with resources outside the VPC.

For Amazon Aurora DB instances, it is not possible choose a specific subnet.

Instead, choose a DB subnet group when you create the instance.

A DB subnet group is a collection of subnets that belong to a VPC.

When it creates the underlying host, Amazon RDS randomly chooses a subnet from the DB subnet group.

Typically, a VPC has both public and private subnets.

If the DB subnet group also contains both public and private subnets, then you can launch the underlying host in either a Public subnet or Private subnet.

It is not possible to connect to the DB instance from outside of the VPC if the underlying host is launch in a Private subnet.

Instead, create a DB subnet group with subnets of similar network configuration.

Follow these steps to ensure that the subnet used by your DB instance has internet access:

1.Firstly, verify that your VPC has an internet gateway attached to it.

2.Verify that all the subnets in the DB subnet group use a route table with Internet Gateway.

  • If the subnet uses the main route table of the VPC, then add the route for Internet Gateway (Destination is
  • If required, create a custom route table with route to Internet Gateway and associate it to the subnet.

3.Add the source Public IP address that you want to connect to the DB instance from in the inbound rules for the security group.

4.For rule Type, choose MySQL/Aurora or PostgreSQL, depending on your engine type.

5.For Source, enter the CIDR range manually, or choose My IP to connect to the DB instance from the same workstation.


Secure the DB cluster from connections from outside the VPC

You can use TLS to encrypt connections that come from outside a VPC because the data transfer happens over the internet.

To make sure that you’re using the highest level of security, use the ssl-ca parameter to pass the CA certificate, and then enable hostname validation.

Use the following example commands for TLS connections, depending on the version of Aurora you are using.

Firstly, Aurora MySQL 5.6 and later:

mysql -h -u master_user --ssl-ca=rds-combined-ca-bundle.pem --ssl-verify-server-cert

Aurora MySQL 5.7 and later:

mysql -h -u master_user --ssl-ca=rds-combined-ca-bundle.pem --ssl-mode=VERIFY_IDENTITY

Aurora PostgreSQL:

psql -h -p 5432 "dbname=postgres user=master_user sslrootcert=rds-combined-ca-bundle.pem sslmode=verify-full"

Please note you can also enforce TLS for DB clusters.

For Aurora MySQL, you must enforce TLS at the database user level. For Aurora PostgreSQL, set the parameter rds.force_ssl to 1.


[Need help with the process? We’d be happy to assist]



In short, we saw how our Support Techs connect to an Amazon Aurora DB cluster from outside a VPC.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.