MY ECS task connects over RDS’s DB endpoint. I even ran my container locally to the RDS PostgreSQL DB and it worked without a problem.
As you can see all the tables are properly created an populated nad Spring Boot App starts fine.
enter image description here
Just about 3-4 minutes after all tables dissapear from Amazon RDS PostgreSQL DB.
enter image description here
ECS logs don’t give any hint at all I only get sql error: 0, sqlstate: 42p01
Which only means that the tables are gone ????
I also tried setting SPRING_JPA_HIBERNATE_DDL-AUTO=update so the App never deletes tables, nevertheless they seem to get deleted anyways. I’ve been trying to work around this for a whole day now, thanks in advance.
My guess is there is some sort of connection issue between ECS and RDS since my local container works fine with the RDS database.
By the way I have a load balancer connected to my ECS service. However I beleive that has nothing to do with it, but I turned on stickiness on the target group just in case, which also did nothing.
Alfredo Dominguez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.