This content is outdated. This version of the Well-Architected Framework is now found at: https://docs.aws.amazon.com/en_us/wellarchitected/2022-03-31/framework/cost-optimization.html

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

Best Practices:

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.