ASCENDING Technical Blog

Cost Optimization S3 (AWS Storage) – Simple way to reduce S3 cost without code change

Written by ASCENDING Admin | Mar 24, 2017 2:03:48 PM

After a few session on how to save cost on EC2, let’s talk about Cost Optimization S3. Storage is a key component in software infrastructure, it needs durability, availability and scalability etc. A common cloud storage choice is S3, we saw all our clients were using S3 but most of them weren’t fully taking advantage of S3 offers in terms of cost saving . We are going to write about a few tricks of Cost Optimization S3 (30%~50% saving) with NO CODE CHANGE REQUIRED.

Storage Option Introduction

In 2015, AWS team has released “New Lower Cost S3 Storage Option & Glacier Price Reduction”. Let’s take close look at the pricing plan of them.

Standard Storage Standard – Infrequent Access Storage Glacier Storage
First 50 TB / month $0.023 per GB $0.0125 per GB $0.004 per GB
GET and all other Requests $0.004 per 10,000 requests $0.01 per 10,000 requests
Data Retrieval None $0.01 per GB $0.01 per GB

To simplify the comparison, let’s focus on pricing for first 50TB in US east region. However, saving percentage should be similar in different volume plan or different region.

Firstly, all AWS storage option are designed to deliver 99.999999999% durability and availability, scalability, we don’t have to compromise moving from one class to the other for Cost Optimization S3. As we can tell from the pricing option, Standard-IA (Infrequent Access Storage) and Glacier is less cheaper in storage but a little expensive in requests.

Identify Storage Class

As we notice the pricing difference between S3 Standard and Standard-IA. There is almost 46% cost dropping in storage and 60% cost arising in access request. Now we have a rough idea, we can consider moving at least two time less accessible objects from “Standard” to “Standard-IA” storage class. I am sure you can find lots of suitable scenarios in your organization such as

  1. log files
  2. database backup files
  3. outdated application artifacts – images, video

Apply Storage Life Cycle

Once we have identify storage objects optimize, it’s time to roll up sleeves. But hold on, what if it requires ZERO CODE CHANGE to optimize storage $$$?  Let me walk you through storage life cycle policy in S3.

  1. Let’s pick a S3 bucket or folder.
  2. Select S3 bucket property, open management tab.
  3. Click on management where you can manage life cycle policy.
  4. Click on “Add lifecycle rule”.
  5. Enter all necessary information including transition, which is the place we can save cost.
  6. There is also an Expiration tab, please be extremely careful with this. I’d personally recommend not to use that in most case on your valuable data. You can either specify a number of days. Adding an expiration means the data will be deleted after the period you specify. Those data will be deleted permanently from S3 and Glacier. There is not way to retrieve back.
  7. Click on save life cycle. Congratulations! You just save roughly 40% of your S3 cost.

Cost Saving

Let’s quantify the saving as usual for all our clients. One of our enterprise client had around 100TB storage. We had moved 40TB to glacier and 30TB to Standard-AI. They used to pay around $2200 just for storage every month, now they only pay $1200 after we proportionally allocate objects to respective storage class without impacting their day to day operation. We have saved them 45% storage cost with NO CODE CHANGE REQUIRED.