Hi there,
I have a Golang program that use gorm to connect to Postgresql and run in AWS lambda, sometimes there are connection errors when it cold start up in AWS Lambda, I have done a lot of tests including upgrade/downgrade gorm version, aws-lambda-go version and so on, but this errors still exist.
Does someone have the same errors and can have a look at this? Thank you very much.
Your Question
Hi there, I have a Golang program that use gorm to connect to Postgresql and run in AWS lambda, sometimes there are connection errors when it cold start up in AWS Lambda, I have done a lot of tests including upgrade/downgrade gorm version, aws-lambda-go version and so on, but this errors still exist.
Does someone have the same errors and can have a look at this? Thank you very much.
Connect code:
Error message:
Golang: v1.22 Gorm: v1.25.10 driver/postgres: v1.5.9 aws-lambda-go: v1.47.0 aws-lambda-go-api-proxy: v0.16.2
The document you expected this should be explained
Expected answer
Gorm can connect DB successful in AWS Lambda.