COST 4: How do you decommission resources?
Implement change control and resource management from project inception to end-of-life.
This ensures you shut down or terminate unused resources to reduce waste.
Resources
AWS Auto Scaling
AWS Trusted Advisor
-
Track resources over their life time: Define and implement a method to track resources and their associations
with systems over their life time. You can use tagging to identify the workload or function of the resource.
-
Implement a decommissioning process: Implement a process to identify and decommission orphaned resources.
-
Decommission resources: Decommission resources triggered by events such as periodic audits, or changes in usage. Decommissioning is typically
performed periodically, and is manual or automated.
-
Decommission resources automatically: Design your workload to gracefully handle resource termination as you identify and decommission
non-critical resources, resources that are not required, or resources
with low utilization.
Improvement Plan
Track resources over their life time
Implement a tagging scheme.: Implement a tagging scheme that identifies the workload the resource belongs to, ensuring that all resources within the workload are tagged accordingly.
AWS tagging strategies
Implement workload throughput or output monitoring.: Implement workload throughput monitoring or alarming, triggering on either input requests or output
completions. Configure it to provide notifications when workload requests or outputs drop to zero, indicating the workload resources are no longer used. Incorporate a time factor if
the workload periodically drops to zero under normal conditions.
Publishing Custom Metrics
Implement a decommissioning process
Create and implement a decommissioning process. : Working with the workload developers and owners, build a decommissioning process for the workload and its resources. The process should cover the method to verify
if the workload is in use, and also if each of the workload resources are in use. The process also covers the steps necessary
to decommission the resource, removing them from service while ensuring compliance
with any regulatory requirements. Any associated resources are
also covered, such as licenses or attached storage. Finally the process
provides notification to the workload owners that the decommissioning process has been executed.
Decommission resources
Decommission resources : Using the decommissioning process, decommission each of the resources that have been
identified as orphaned.
Decommission resources automatically
Implement AWS Auto Scaling : For resources that are supported, configure them with AWS Auto Scaling.
Getting Started with Amazon EC2 Auto Scaling
Configure CloudWatch to Terminate Instances : Instances can be configured to terminate using CloudWatch alarms. Using the metrics from the decommissioning process, implement an alarm with
an EC2 action. Ensure you verify the operation in a non-production
environment before rolling out.
Create Alarms to Stop, Terminate, Reboot, or Recover an Instance
Implement code within the workload : You can use the AWS SDK or AWS CLI to decommission workload resources. Implement code within the application that integrates with AWS and terminates
or removes resources that are no longer used.