| name | cis-aws-compute-3.12 |
| description | Ensure Amazon ECS task definitions are tagged |
| category | cis-compute |
| version | 1.1.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","compute","ecs","containers","task-definitions","tagging","asset-management","compliance"] |
| cis_id | 3.12 |
| cis_benchmark | CIS AWS Compute Services Benchmark v1.1.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-compute-3.10","cis-aws-compute-3.11"] |
| prerequisites | [] |
| severity_boost | {} |
Ensure Amazon ECS task definitions are tagged
Description
Ensure all Amazon ECS task definitions have resource tags to facilitate asset management, tracking, and compliance.
Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed.
Rationale
Consistent tagging supports compliance and helps identify unauthorized or misconfigured resources.
Impact
There is minimal administrative overhead associated with implementing and maintaining resource tags.
Audit Procedure
Using AWS Console
- Login to the ECS console using https://console.aws.amazon.com/ecs/.
- In the left panel, click
Task definitions.
- Click the name of a task definition.
- Click on the latest active revision of the task definition.
- Click
Tags.
- Ensure at least one tag is listed that does not begin with
aws:. Tags prefixed with aws: are AWS-managed.
- Repeat steps 1-6 for each ECS task definition.
Using AWS CLI
Run the following command to list task definitions:
aws ecs list-task-definitions
For the latest revision, run the following command to view the tags:
aws ecs list-tags-for-resource --resource-arn <task-definition-arn>
Ensure that tags are returned that do not begin with aws:. Tags prefixed with aws: are AWS-managed.
Repeat for each task definition.
Expected Result
All ECS task definitions should have at least one user-defined tag (not prefixed with aws:).
Remediation
Using AWS Console
- Login to the ECS console using https://console.aws.amazon.com/ecs/.
- In the left panel, click
Task definitions.
- Click the name of a task definition.
- Click on the latest active revision of the task definition.
- Click
Create new revision.
- Click
Create new revision again.
- Expand the
Tags section.
- Click
Add tag.
- Provide a and for the tag.