3

I am trying to deploy the Strapi on AWS Fargate serverless environment through GitlabCI. Using AWS MySQL Aurora database for the DB integration. The database is up and running properly. When my CICD is trying to deploy it on Fargate, somehow it is not able to get connected with my DB. I am injecting env variables in Task Definition through Secret manager.

I am getting this error "getaddrinfo ENOTFOUND" in cloudwatch logs. Not sure what to do as everything is going on through CICD only. I can think of, Do we need to mention anything in database.js file or server.js file regarding my database or in Dockerfile? Or in GitlabCI configuration?

I know this is a very specific process but still if any one would be able to help me out.

Thanks, Tushar

Tushar
  • 31
  • 3
  • The message seems to be leaning towards a DNS resolution issue. We have just introduced [ECS Exec](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) support to allow customers to connect to the container in the task. My suggestion would be to connect to your task and try to debug connectivity from the inside. – mreferre Apr 07 '21 at 13:35
  • So I have made it working but have to change the solution. Now using AWS Fargate container instance-based, AWS Aurora instance-based so I will be having more visibility of my resources. Updated ALB to monitor instance and not IP. Maybe my application does not support the earlier solution. Still looking for support. – Tushar Apr 08 '21 at 17:35

0 Answers0