Public cloud bills can add up quickly. As you develop more cloud native applications and migrate additional legacy workloads to cloud, the complexity of managing the costs of your overall cloud environment increases exponentially. Need help with where to start identifying potential savings opportunities? In this ongoing blog series, we’ll explore best practices designed to help lower your Amazon Web Services (AWS) spend. We’ll provide you with tips and best practices to optimize your cloud environment.

Best Practice #1 – Eliminate Zombie Assets

Start your zombie hunt by identifying instances that have a Max CPU% < 5% over the past 30 days. This doesn't automatically mean this instance is a zombie, but it's worth further investigation.

Zombie assets are infrastructure components that are running in your cloud environment but not being used for any purpose. Zombie assets come in many forms. For example, they could be EC2 once used for a particular purpose but are no longer in use and have not been turned off. Zombie EC2 instances also can occur when instances fail during the launch process or because of errors in script that fail to deprovision instances.

Zombie assets can also come in the form of idle Elastic Load Balancers (ELB) that aren’t being used effectively or an idle Relational Database Service (RDS) instance. No matter the cause, AWS will charge for them as long as these assets are in a running state.

They must be isolated, evaluated, and immediately terminated if deemed nonessential. Take a snap-shot, or point-in-time copy, of the asset before terminating or stopping it to ensure you can recover it if the asset is needed again.

One customer had a nightly process to help its engineering velocity — loading an anonymized production database into RDS to use for testing and verification in a safe environment. The process worked well and saved a lot of time for engineers. However, while the automation was good at spinning up new environments, the customer never made a plan for cleanup. Each night a new RDS instance was spun up, with the attached resources, and then was abandoned, eventually leaving hundreds of zombie resources.

Take Control of Your Cloud

It’s important to remember that these best practices are not meant to be one-time activities, but ongoing processes. Because of the dynamic and ever-changing nature of the cloud, cost optimization activities should ideally take place continuously. Learn more about how LeanCloud can help you automate the continuous optimization of your cloud environment.