navigation

Optimizing EC2 Costs with Lambda

Overview

This article demonstrates how to leverage Lambda functions to optimize your system’s costs within the AWS environment. For instances that need to run only a few hours a day, we can utilize a Lambda function to automate server startup and shutdown.

In cases where instances must operate 24/7, cost optimization can be achieved through the purchase of a Savings Plan. A Savings Plan represents a long-term commitment to receive discounts. You can find detailed information on how to purchase a Savings Plan here.

The deployment model is illustrated below:

Optimize cost with Lambda

Content

  1. Introduction
  2. Preparation Steps
  3. Creating Tags for Instances
  4. Creating a Role for Lambda Function
  5. Creating the Lambda Function
  6. Testing Results
  7. Resource Cleanup