Passing sensitive data to an Amazon ECS container - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Passing sensitive data to an Amazon ECS container

You can safely pass sensitive data, such as credentials to a database, into your container.

You can use Amazon Secrets Manager or as a parameter in Amazon Systems Manager Parameter Store to store the secret.

You can retrieve secrets programmatically from the application, or by using environment variables.

To start, first store the sensitive data as a secret in Amazon Secrets Manager or as a parameter in Amazon Systems Manager Parameter Store. Then, use one of the following ways to expose the secret to the container.