I have a docker container that I would like to "port" to ECS. My Dockerfile
contains a VOLUME
instruction:
VOLUME /app/configuration
So using docker on a linux machine, you just point to the folder you would like to associate the VOLUME to either using docker run
or in the docker-compose
file. This is already configured by myself with values.
What I don't know, is how to accomplish the same thing on ECS? Is there an idiom for using volumes containing configurations?
I have followed the ECS Volumes Guide, but this just tells you how to use a blank volume for the intent of persistence, not how to use a volume with configuration data.
The options I think I have:
- Store configuration information in S3, not sure if this is a good idea because there are database secrets involved. I suppose that this can be locked down using IAM Policies?
- Maybe use an EFS volume? The idea is then mount the EFS volume somewhere, put the configuration data on it, then mount that volume on ECS?
So while I know how to do this in Docker, what's the best way to approach this on AWS?