amazon-web-servicesgoamazon-rdsamazon-rds-proxy

AWS RDS Proxy connection


I have written a golang aws lambda application and used sqlx for database connection .

I am having problem as the number of db connection is going up too quickly and exhausting the total number connection.

After doing some read, I came across aws rds proxy, but haven't get any example how to use it with Go.


Solution

  • You need to use the proxy URL for connecting to DB in the client. The authentication can be done via native way or based on IAM. The proxy configuration can be found in the below doc

    https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html#rds-proxy-connecting-native