I am using an existing docker-compose.yml to migrate an app to ECS. The config references several $ENV vars which I used to pass in simply as environment variables when running docker-compose up
. One of these is a password, which used to be specified on the Docker host. In ECS you are advised not to pass sensitive stuff along with the env-vars, so I'd like to improve this and use the best practises.
In FARGATE, I can't see how to pass these secure parameters into to the ecs-cli compose service up
without sending them into the docker-compose used by ecs-cli (and then they end up displayed in the console, I guess possibly logged, etc).
The ECS CLI documentation explains to use SSM
secrets
allows you to specify secrets which will be retrieved from SSM Parameter Store. See the ECS Docs for more information, including how reference AWS Secrets Managers secrets from SSM Parameter Store. value_from is the SSM Parameter ARN or name (if the parameter is in the same region as your ECS Task). name is the name of the environment variable in which the secret will be stored.
But under the ECS Docs
"This feature is not yet supported for tasks using the Fargate launch type."
I presume the "yet" means there will be one day.
I wonder if there's an current alternative for Fargate, or if we have to be less secure while they add support for it?