| name | cis-aws-compute-2.11 |
| description | Ensure instances stopped for over 90 days are removed |
| category | cis-compute |
| version | 1.1.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","compute","ec2","stopped-instances","cleanup","lifecycle"] |
| cis_id | 2.11 |
| cis_benchmark | CIS AWS Compute Services Benchmark v1.1.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-compute-2.5","cis-aws-compute-2.12"] |
| prerequisites | [] |
| severity_boost | {} |
Ensure instances stopped for over 90 days are removed
Description
Enable this rule to help with the baseline configuration of Amazon Elastic Compute Cloud (Amazon EC2) instances by checking whether Amazon EC2 instances have been stopped for more than the allowed number of days, according to your organization's standards.
Rationale
Stopped instances that are no longer needed consume resources and may contain outdated configurations or unpatched software. Removing them reduces the attack surface and management overhead.
Impact
Terminating instances is irreversible. Ensure data on the instance is backed up or no longer needed before termination.
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 EC2 console at https://console.aws.amazon.com/ec2/.
- In the left pane, click
Instances, click Instances.
- Select the Instance for review.
- Under the
Details tab.
- Review the
Launch time.
If the Launch time of the selected Instance is greater than 90 days, the Instance has been offline and is considered outdated.
- Repeat steps no. 3 - 5 to verify the Launch date for the other instances.
Repeat all steps for the other regions.
Refer to the remediation procedure below if any of the Launch times are over 90 days.
Expected Result
No stopped instances should have a Launch time older than 90 days. All stopped instances beyond this threshold should be terminated.
Remediation
Using AWS CLI
No specific CLI remediation command is provided for this control. Use the console method below.
Using AWS Console
-
Login to the EC2 console at https://console.aws.amazon.com/ec2/.
-
In the left pane, click Instances, click Instances.
-
Select the Instance for that hasn't been used for over 90 days.
-
Under the Details tab.
-
Click Instance state, click Terminate instance.
-
Click Terminate.