Check ID: ecs_task_definitions_logging_enabled
Provider: AWS
Service: ecs
Severity: HIGH
Categories: logging
Resource type: AwsEcsTaskDefinition

What this check verifies

Amazon ECS task definition containers specify a logging configuration with a non-null logDriver for every container in the latest active revision.

Risk

Absent container logs erode visibility, letting intrusions, data exfiltration, and configuration tampering go undetected. Missing audit trails weaken confidentiality and integrity, hinder forensics, and increase MTTR during outages, impacting availability and compliance evidence.

Recommendation

Implement centralized, tamper-resistant container logging for all tasks. Define a logDriver per container and ship logs to a managed destination with restricted access. Apply least privilege, encryption, and retention. Monitor and alert on anomalies. If using external collectors, ensure equivalent coverage and durability.

Remediation

aws ecs register-task-definition --family <task-family> --container-definitions '[{"name":"<container-name>","image":"<image>","logConfiguration":{"logDriver":"awslogs","options":{"awslogs-group":"<log-group>","awslogs-region":"<region>"}}}]'

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = ecs_task_definitions_logging_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks