Ensure an Organizational EC2 Tag Policy has been Created
Description
A tag policy enables you to define tag compliance rules to help you maintain consistency in the tags attached to your organization's resources.
Rationale
You can use an EC2 tag policy to enforce your tag strategy across all of your EC2 resources.
Impact
Creating and enforcing tag policies may prevent resource creation if tags do not comply with the defined policy, potentially affecting automated deployments.
Audit Procedure
Using AWS CLI
No specific CLI audit command is provided for this control. Use the console method below.
Using AWS Console
- Login to the AWS Organizations using https://console.aws.amazon.com/organizations/
- On the left click
Policies. - Click on
Tag policies. - Confirm that a policy name exists with a description.
- Click on the policy for EC2 Tagging as indicated in the name, description or both.
- Click on
Edit policy. - Confirm that
Tag key capitalization complianceis checked. - Confirm that
Prevent non-compliant operations for this tagis checked. - Confirm that
ec2:image,ec2:instanceandec2:reserved-instancesare listed.
If the tag policy does not exist with the settings listed above refer to the remediation below.
Expected Result
An EC2 tag policy should exist with Tag key capitalization compliance enabled, non-compliant operations prevented, and ec2:image, ec2:instance, and ec2:reserved-instances resource types specified.
Remediation
Using AWS CLI
No specific CLI remediation command is provided for this control. Use the console method below.
Using AWS Console
You must sign in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's management account.
To create a tag policy:
- Login to the AWS Organizations using https://console.aws.amazon.com/organizations/
- Left hand side Click on
Policies. - Under
Support policy typesclick onTag policies. - Under
Available policiesclick onCreate policy. - Enter policy name.
- Enter policy description (Indicate this is the EC2 tag policy).
- For New tag key 1, specify the name of a tag key to add.
- For
Tag key capitalization complianceselect the box for Use the capitalization to enable this option mandating a specific capitalization for the tag key using this policy. - For
Resource types to enforcecheck the box forPrevent non-compliant operations for this tag. - Click on
Specify resource types. - Expand EC2.
- Select ec2:image, ec2:instance, ec2:reserved-instances.
- Click
Save changes. - Click
Create policy.
Default Value
No EC2 tag policies exist by default.
References
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x |
| v7 | 1.5 Maintain Asset Inventory Information | x | x |
Profile
Level 1 | Manual