1

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?

Shiraaz.M
  • 111
  • 1
  • Use the [AWS Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) to store passwords / URLs / etc. – Tim Jun 04 '18 at 21:23

0 Answers0