Amazon RDS
cloud computing
database management
AWS settings
security configuration

How do I change the publicly accessible option for Amazon RDS?

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Changing the Publicly accessible setting on an Amazon RDS instance is a network exposure change, not a complete networking solution by itself. Even when you switch the option to Yes, the database still needs the right subnet routing, security groups, and ACLs before anything on the internet can actually reach it.

That is why the safest mental model is this: the flag controls whether RDS may expose the instance through a public path, but real reachability is still governed by the surrounding VPC configuration.

What the Setting Means

For an RDS instance in a VPC:

  • 'Publicly accessible = Yes means the instance can be reachable from outside the VPC if networking rules allow it.'
  • 'Publicly accessible = No means the instance is intended for private access only, usually from application hosts, VPN-connected clients, or bastion systems.'

This is a security decision, so it should be considered together with inbound rules and client access patterns.

Change It in the AWS Console

In the AWS console, open the DB instance, choose Modify, and find the Publicly accessible option in the connectivity or network section. Change it to Yes or No, continue through the review screen, and decide whether to apply the change immediately or wait for the maintenance window.

The exact UI labels can move slightly over time, but the operation remains a DB instance modification rather than a separate networking action.

Change It with the AWS CLI

The CLI version is explicit and script-friendly:

bash
1aws rds modify-db-instance \
2  --db-instance-identifier mydb \
3  --publicly-accessible \
4  --apply-immediately

To switch it back to private access:

bash
1aws rds modify-db-instance \
2  --db-instance-identifier mydb \
3  --no-publicly-accessible \
4  --apply-immediately

If you want the change deferred to the next maintenance window, omit --apply-immediately.

Public Does Not Mean Reachable Yet

After the setting changes, you still need to verify:

  • the DB subnet group places the instance in subnets with the right routing,
  • the security group allows inbound traffic on the correct database port,
  • network ACLs are not blocking the connection,
  • the client can resolve and reach the RDS endpoint.

That is the reason many people toggle the option and still cannot connect. The public-access flag is necessary for public exposure, but it does not replace network policy.

Verify the Result

Once the modification finishes, check the endpoint and test from an allowed client. For example, for PostgreSQL:

bash
psql -h mydb.xxxxxx.us-east-1.rds.amazonaws.com -U appuser -d appdb

If DNS resolves but the connection times out, the problem is usually networking. If the connection reaches the server and then fails, you are probably looking at credentials or database-level permissions instead.

Common Pitfalls

  • Making an RDS instance public without restricting the security group to trusted source IP ranges.
  • Assuming the flag alone will override subnet routing or ACL issues.
  • Applying the change immediately on a production system without considering the operational timing.
  • Making the database public when a private design with application hosts or a bastion would be safer.
  • Forgetting to verify the effective endpoint and port after the change completes.

Summary

  • You can change the public-access setting through Modify in the AWS console or modify-db-instance in the CLI.
  • The setting controls exposure intent, not full connectivity by itself.
  • Subnets, routing, security groups, and ACLs still determine whether the instance is actually reachable.
  • Use --apply-immediately only when the timing is acceptable.
  • Treat public accessibility as a security decision, not just a convenience toggle.

Course illustration
Course illustration

All Rights Reserved.