I am trying to use RDS proxy with TypeORM in a nestjs application. RDS Proxy uses IAM authentication, because of which I am getting authentication error after 15 minutes. Please let me know if there is a way to make typeorm refresh the token before it gets expire. (Type orm is loaded as part of app module in the nestjs lambda function)
Asked
Active
Viewed 1,539 times
0
-
What is the authentication error that you are getting ? More information will be helpful to figure out the issue. – Pasindu Dilshan Aug 19 '22 at 07:51
1 Answers
0
you can give your ec2 access to your RDS via IAM Role.
If want to connect locally. No need to pass the credentials via code.
OR
- Install aws-cli.
- Run: aws configure.
- Add secret and access keys and session tokens, which should have access to your RDS. This will add your credentials under the .aws/credentials file(or look for credentials file).
- Write and run a background process that updates the credentials under credetails file before it expires.

AZ_
- 3,094
- 1
- 9
- 19
-
the application is a lambda function (edited the original question) – Anil Bhaskaran May 15 '21 at 19:01