SUS03-BP02 Remove or refactor workload components with low or no use
Remove components that are unused and no longer required, and refactor components with little utilization to minimize waste in your workload.
Common anti-patterns:
-
You do not regularly check the utilization level of individual components of your workload.
-
You do not check and analyze recommendations from AWS rightsizing tools such as AWS Compute Optimizer
.
Benefits of establishing this best practice: Removing unused components minimizes waste and improves the overall efficiency of your cloud workload.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
Unused or underutilized components in a cloud workload consume unnecessary compute, storage or network resources. Remove or refactor these components to directly reduce waste and improve the overall efficiency of a cloud workload. This is an iterative improvement process which can be initiated by changes in demand or the release of a new cloud service. For example, a significant drop in AWS Lambda function run time can be indicate a need to lower the memory size. Also, as AWS releases new services and features, the optimal services and architecture for your workload may change.
Continually monitor workload activity and look for opportunities to improve the utilization level of individual components. By removing idle components and performing rightsizing activities, you meet your business requirements with the fewest cloud resources.
Implementation steps
-
Inventory your AWS resourceds: Create an inventory of your AWS resources. In AWS, you can turn on AWS Resource Explorer to explore and organize your AWS resources. For more details, see AWS re:Invent 2022 - How to manage resources and applications at scale on AWS
. -
Monitor utilization: Monitor and capture the utilization metrics for critical components of your workload (like CPU utilization, memory utilization, or network throughput in Amazon CloudWatch metrics).
-
Identify unused components: Identify unused or under-utilized components in your architecture.
-
For stable workloads, check AWS rightsizing tools such as AWS Compute Optimizer
at regular intervals to identify idle, unused, or underutilized components. -
For ephemeral workloads, evaluate utilization metrics to identify idle, unused, or underutilized components.
-
-
Remove unused components: Retire components and associated assets (like Amazon ECR images) that are no longer needed.
-
Refactor underutilized components: Refactor or consolidate underutilized components with other resources to improve utilization efficiency. For example, you can provision multiple small databases on a single Amazon RDS
database instance instead of running databases on individual underutilized instances. -
Evaluate improvements: Understand the resources provisioned by your workload to complete a unit of work. Use this information to evaluate improvements achieved by removing or refactoring components.
Resources
Related documents:
Related videos:
Related examples: