Configure public access for your Lightsail database
Your managed database in Amazon Lightsail is accessible only by your Lightsail resources (instances, load balancers, etc.) that are in the same Lightsail account. One common scenario is to create both a Lightsail instance with a public-facing web application and a Lightsail database that is not publicly accessible, and then connect the two.
Enable the public mode feature to make your database publicly accessible. This way, anyone with the database endpoint, port, user name, and password can connect to your database. For more information, see Connect to your MySQL database or Connect to your PostgreSQL database.
To configure the public mode for your database
-
Sign in to the Lightsail console
. -
On the Lightsail home page, choose the Databases tab.
-
Choose the name of the database for which you want to configure public mode.
-
Choose the Networking tab.
-
Under the Public mode section, use the toggle to turn it on. Likewise, use the toggle to turn it off.
The public accessibility setting begins applying immediately but may require a few minutes to complete. During this time, the status of your database changes to Modifying. The status of your database changes to Available after the public accessibility setting is applied.
Next steps
Here are a few guides to help you manage your database: