Cannot connect to public RDS after instance class upgrade

0

Tonight I upgraded my db.t3.small to db.t3.medium and increased the allocated memory from 40gb to 100gb.

After taking a snapshot and successfully upgrading, everything is working well in my application that uses an rds proxy to connect to the database, however, when I try to connect to the direct endpoint from my database tool, I get a timeout. I have connected to this db many times from the tool before, and verified the db is still set to be publicly accessible & no changes have taken place in the db subnet/security groups that I previously had used to connect.

I tried restarting the tool, and switching my local backend to the database as well (which I had done shortly before the upgrade)

The only difference I can see right now is that the status is in Storage-optimization 0% and has been for an hour or so. From what I have read, this should not impact the availability of the database, though.

Please let me know if I can provide any additional information or any suggestions.

awebber
asked 7 months ago377 views
2 Answers
0

Did the public IP address change during the instance upgrade, and if it did are you definitely connecting to the new public IP?

Would there be any firewall rules in place that might be blocking access to the new public IP (if indeed there is one)?

You mention that the application uses a proxy that's still working well, is this RDS Proxy or a non-AWS proxy? And is this connecting to the public or private IP of the RDS instance?

There are a lot more useful troubleshooting steps here https://repost.aws/knowledge-center/rds-ip-address-issues

profile picture
EXPERT
Steve_M
answered 7 months ago
  • I use the provided endpoint to connect and not the IP of the db so I do not know if the IP changed after the upgrade.

    Yes - the proxy is an RDS proxy. For the public/private IP that it is connected to - I believe it is the private IP but where can I look to confirm that?

  • As RDS Proxy is not publicly accessible, it must be using the private IP.

    Your connection tool uses the public IP though, yes?

    Did the endpoint name change as part of the update, and if it did is your connection tool definitely using the updated endpoint name to attempt to connect?

  • The connection tool uses the endpoint provided by rds - so its the name and ends with <region>.rds.amazonaws.com

    After upgrading, the endpoint remains the same as it was before and I have ensured this by copying the value again from the console and trying to test the connection with that and still getting the timeout

  • So at this point: the subnets that comprise the subnet group haven't changed, the security group rules haven't changed, the endpoint address hasn't changed, and there aren't any firewall rules between you and the endpoint. The app can still talk to the DB using RDS proxy (private), but you can't connect to the DB (public).

    Consider looking at reachability analyser which should be able to show exactly how far the connection is getting before it drops https://aws.amazon.com/blogs/database/troubleshoot-network-connectivity-to-amazon-rds-databases-using-vpc-reachability-analyzer/

  • At this point I am leaning towards the issue being related to the status being Storage-optimization stuck at 0% after 6+ hours. What causing the optimization to get stuck at 0 percent?

0

Hello.

Can you check the public IP address if you resolve the name of the RDS endpoint using the command below?
Also, are all the subnets in the subnet group public subnets?
If it is not a public subnet, try adding a route to the Internet gateway to your route table.

nslookup RDS-Endpoint

This is not related to this issue, but it is not a good idea for security to make the database publicly accessible.
We recommend that you change the configuration as shown in the document below and use the port forwarding feature of Systems Manager Session Manager.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

profile picture
EXPERT
answered 7 months ago
  • Thanks for the reply!

    Yes, running nslookup does return an IP address - I will take a look at the document you have provided as well.

  • By the way, has the IP address of the connection source changed?

  • I don't believe so but where can I confirm that? I have always used the endpoint provided in the details when I need to access directly.

  • You can check the global IP address you are using with the following command. Please check whether this IP address is allowed by the inbound rules of the security group configured in RDS.

    curl ifconfig.io -4
    
  • It is - I also added my ip to the inbound rules to test

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions