1
votes

I'm trying to access AWS RDS instance from my local PC.

I followed trouble-shooting procedure from :

How can I troubleshoot connectivity to an Amazon RDS instance that uses a public or private subnet of a VPC?

I checked Public accessibility is YES

and switched to public subnet, but still cannot access RDS instance.

Can anyone help ?

2

2 Answers

3
votes

My strategy for local development has usually been:

Have RDS instance in a private VPC.

Have an EC2 instance (cheapest one you can find) on the private VPC but also public SSH access.

Create an SSH tunnel through the EC2 instance to the RDS instance.

Configure your dev environment to connect to the SSH tunnel.

This is usually much easier to configure (and more secure to boot)

2
votes

RDS has a security group attached, You need to white list your public ip in the security group, so that you can access the database from your pc.

Find the security group

  • Goto amazon RDS console
  • Click `Databases on the left
  • Click to select your database instance from the list of databases
  • Under the connectivity and Security tab, you can find the option called VPC security groups
  • Click the Security group name to add your public ip address

Adding your public ip to the security group

  • Select the inbound rules tab
  • Click the Edit
  • Select the type of database in the type column, for e.g mysql
  • Under the Source column , select My IP
  • Also give a meaningful description, such as my home

Note: Many internet service providers allocates dynamic ip addresses instead of static ip address, which means your ip address may change frequently. Hence you need to add your new ip address to the security group when this happens.