Reputation: 4811
I was looking at this post on how to update a container of an ecs service. It requires me to pass in a JSON file with the task definition. My only worry is that if I have this on a CI/CD platform, I will have to commit my task definition, which contains secrets in the environment variables section.
Upvotes: 0
Views: 697
Reputation: 204
You should consider using AWS Parameter Store and chamber as described in this blog: https://aws.amazon.com/blogs/mt/the-right-way-to-store-secrets-using-parameter-store/
Briefly, the steps can be summarized as:
chamber
locally where you can run it with suitable AWS privileges.parameter_store_key
.chamber write <service> <key> <value>
to add key=value
into Parameter Store (<service>
is a label for your application).chamber
into your docker image.ENTRYPOINT
of your docker image to run chamber exec <service> -- yourapp
.<service>
will now be available to your app in the environment.Upvotes: 2