Lower your AWS CloudFront Bills with AWS PPA !
Tags: aws, finops, cloudfront
Published: 2024-01-15 21:20:16

AWS PPA (Private Pricing Addendum) is a discounted pricing model for a specific AWS service with high consumption (commitment per year). We are not talking about EDP, Savings plan, this is another discount.

There is not so much content about AWS PPA. I have practical experience with s3 and CloudFront PPA which is why I wanted to tackle this topic.

So let's deep dive into AWS PPA for CloudFront.

I checked the AWS documentation about this topic, and PPA is not mentioned in any of them.

However, when we are looking at the CloudFront pricing page, the following part corresponds to PPA I think:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cesskcjk9zhgvpzv4m84.png)

As mentioned below, you can start talking to AWS about PPA when you have 10TB/month for Data Transfer Out to Internet.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gtsz49yfiqhgjg1qjdr9.png)

The CloudFront Savings Bundle is another discount program. I won't explain this offer here. 

# What do we need to remember?
 It is not possible to combine both PPA and CloudFront Savings Bundle. According to AWS, the PPA is more advantageous than the CloudFront Savings Bundle.

# How does the Private Pricing Addendum apply to CloudFront?

You will find below to which CloudFront usage type the PPA is applied. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h641yadv5yij92bhs9f0.png)

- **DataTransfer-Out-Bytes:** From CloudFront to Internet (GB).
- **DataTransfer-Out-OBytes:** From CloudFront to origin (GB).
- **Request-Tier1/2(HTTP/HTTPS):** HTTP(S) GET and HEAD requests.
- **Request-HTTP(S)-Proxy:** HTTP(S) DELETE, OPTIONS, PATCH, POST, and PUT requests from CloudFront to your origin.

# Recommendations
AWS suggests a helpful tip to decrease your bills related to DOT (DataTransfer Out to Internet).

Because of the discount model of CloudFront, you can put it in front of any AWS services that transfer data to the internet. This way, we will use CloudFront as a simple proxy but with the lowest price for DOT.

**HOWEVER,** there is indeed some missing information regarding this recommendation.

## What is missing on the CloudFront Pricing page?

As of writing these lines, the Pricing Example 2 from the documentation mentions this:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5z66zevo5x30cnmuk981.png)

AWS forgot to mention two usage types here:

- **DataTransfer-Out-OBytes**:from CloudFront to origin (GB).
- **Requests-HTTP(S)-Proxy**: Forward from CloudFront to origin.

We can put CloudFront in front of any AWS services, and that is a good point. However, if your workload does not use any CloudFront features and uses it just as a proxy, you will have a high consumption of these two metrics.

**IMPORTANT**
Even with a PPA commitment, the usage type **DataTransfer-Out-OBytes** does not have PPA applied to it (cf. diagram above).

This point deserves a dedicated example on the pricing page!

## Take Aways
- Check the eligibility of your DataTransfer to Internet for PPA.
- Do your own maths for DOT optimization with CloudFront.

Source:
https://aws.amazon.com/cloudfront/pricing/
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/billing-and-usage-interpreting.html