High ECS Regional

Secrets should not be passed as container environment variables

NISTISO 27001

Description

Detects ECS containers that pass secrets (such as AWS_ACCESS_KEY_ID, PASSWORD, or TOKEN) as plain-text environment variables.


Remediation

To prevent passing secrets as environment variables, use AWS Secrets Manager or parameter store to manage secrets.

Steps

  1. Open the Amazon ECS console.
  2. In the left navigation pane, choose Task definitions.
  3. Select a task definition and choose Create new revision with JSON.
  4. Modify the container definition to use AWS Secrets Manager or parameter store for secrets.
  5. Choose Create.

Compliance

NISTISO 27001