I'm having a hard time reconciling some online advice that injecting secrets (usually passwords) as environment variables into docker containers is "not secure" with the native features of AWS ECS and even EKS where secrets stored within AWS Secrets Manager are provided as environment variables. I want to use the native features of these platforms, but it seems that this is not a good idea.
I really like the native /run/secrets
approach of "raw" docker - but that feature doesn't scale up to SecretsManager+ECS. I'm left thinking that the only "secure" way of managing secrets and exposing to my app is to write dedicated application code that queries AWS Secrets Manager directly. Is this conclusion correct? Or can I trust the platform?
References:
And counter-arguments: