Search code examples
amazon-ec2docker-composeamazon-ecsaws-cliaws-parameter-store

Yet another ecs-cli and Parameter Store question


Hoping I'll catch a break as a complete ECS NOOB =)

So far I think I've managed to build out a good start, using ECS-CLI to create a cluster for two docker containers that go together and should run on the same instance (x2). However, at the time of either my ecs-cli up or my ecs-cli compose, I need to get the command to build the task in such a way that it can access a set of environment variables stored in AWS Parameter Store. I don't see any options to do that with ecs-cli, for neither 'up' nor 'compose'.

What am I missing? Help! I'm not sure yet what other info to provide, or I'd post all that I can, so please let me know what other data/background you need if you think you have an answer.

All comments very much appreciated of course!


Solution

  • See the secrets section in the ecs-cli documentation here. You would configure ECS to pull those secrets from SSM Parameter Store and inject them as environment variables into your container using that method.