0

My application - a Postgres/Nginx/Django application powered by docker-compose. 3 separate containers.

My production setup - Nginx/Django containers hosted on Amazon ECR. Deployment to a single cluster/service on AWS Fargate.

My confusion - should I externalize my Postgres database into AWS managed service or is there a way to keep things persistent in Fargate?

user1787531
  • 103
  • 1
  • 2

2 Answers2

1

Since April 2020 Fargate also supports stable storage in the form of AWS Elastic File System (EFS).

This means that you could add one or more volume definitions to each task definition.

That said, I would still not recommend running you database from EFS. The managed databases that AWS provides are so much easier to work with. The intended use for EFS in combination with Fargate seems primarily be uploads folders, shared caches and things like that.

Mediascreen
  • 111
  • 1
0

Fargate only provides ephemeral storage (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-task-storage.html). Running a Database on Fargate is a no-go.

I would indeed recommend that you use RDS unless you have a clear requirement or limitation that drives you to manage it yourself.