Saving Plans on Lambda Functions

Written by Aditya Datta


As anticipated by many, AWS recently announced support of the Saving Plans for lambda functions. We expect to see more of these movements, and likely the catalog of AWS products covered by Savings Plan will keep growing (RDS anyone?). A Savings Plan will allow obtaining costs-savings in exchange for a commitment for 1-year or 3-year to a given amount of hourly spend in dollars.

Let me provide a quick recap on how the AWS Lambda Function workload is invoiced. There are three categories of AWS charges for Lambda usage:

  • Number of Requests: the price is $ / # of requests
  • “Memory-Normalized” Concurrency: the price is $ / second of provisioned
  • “Memory-Normalized” Duration (against the base 128MB): the price is $ / second of usage

The first one is a fixed value. The Concurrency depends on the memory size of the Lambda Function and the time the concurrency reservation is provisioned. And finally, the Duration price depends on whether the Lambda function is running over a reserved concurrency, which makes it cheaper or not.

How do Saving Plans apply to Lambda Function?

There is a 15% discount rate for a 1-year term and a 17% discount rate for a 3-years term, but these only apply for Concurrency and Duration.

In order to verify the coverage, it’s possible to make use of the Filters in the Cost Explorer under the “AWS Cost Management > Savings Plans > Coverage report ” option.

When to purchase Saving Plans to cover Lambda Function usage?

AWS Cost Explorer is already providing recommendations to purchase Savings Plan to cover Lambda usage.
Unfortunately, the Utilization Report in the Cost Explorer is not providing any information on the current usage of the Saving Plans as there is no filter for the Service.

However, Savings Plans apply from the highest discount % to lowest discount %, which means that most probably a Savings Plan will be covering EC2 or Fargates which offer a significantly higher discount rate. Only if the coverage of both EC2 and Fargate is 100%, the discount will be applied to AWS Lambda Functions. A good use case to maximize savings would be to cover all the spikes of EC2 with Saving Plans and use the rests for Lambdas during valley time.

If Lambda Function usage is constant, it should be easy to provide a value. If not, probably you might want to talk with us to find the best strategy to maximize your ROI on the AWS Saving Instruments.

Example

As the Savings Plans apply from the highest discount rate to lowest, it will start saving on high discounts like Linux EC2 instances (in the order of 60% discount rate), then to RDS (30% to 50%), and finally Lambdas (15% – 17%). For 1 year reservation, a total amount of $2/hour this could mean the following:

GET STARTED
cloudwiryqa
Share
This