DEV Community

Discussion on: 3 ways to handle secrets in AWS ECS tasks

Collapse
 
farrukhnaeem14 profile image
Farrukh Naeem

@sagarjauhari , this is a very good article. Just one question, how are these variables referenced by the application itself? Like how can I pass the values of these variables to my config file. With your example, it seems like the secrets are exposed to the container but how are we going to reference them in the application code itself.

Collapse
 
sagarjauhari profile image
Sagar Jauhari

Good question. If you follow one of these approaches, your docker application would be able access these variables in the environment. If it is a python app, you can do os.getenv() or for golang value, exists := os.LookupEnv(key)