Close

Let's get on each others' calendars.

10 Practical Tips for Managing AWS S3 Costs

You know the pricing plans. You know that you’re paying too much. Yet, no matter what you do, actually managing AWS S3 costs is a nightmare of confusing details and hidden charges that feels impossible to navigate.

Don’t worry, that’s why we’re here.

This post will teach you everything you need to know about how to manage AWS S3 costs via 10 practical tips for doing just that. From simple tricks to life-and-wallet-saving hacks, read on to discover more.

This post will cover:

  • The basic S3 costs
  • 5 tips to manage basic S3 costs
  • The bonus S3 costs
  • 5 tips to manage bonus S3 costs
  • Managing AWS S3 costs the easy way

Let’s get started.

The basic S3 costs

Source, image in the public domain

First up, don’t worry. We’re not going to go into the bulk of S3 pricing details, as we’ve already done that in our Ultimate Guide to S3 Pricing. However, a quick refresher on the types of basic S3 costs doesn’t hurt.

When using S3 your main costs will always depend on the plan you select to use, which will largely depend on the type of storage that you need. More specifically, your varying needs for reliability, access speed, and access frequency are the main drivers of the basic S3 costs.

All S3 pricing plans charge based on a per GB stored per month basis, but most also vary in the price of any requests submitted to the bucket (per 1,000 requests per month) and any data retrieval costs too. The general storage costs decrease as you move from the plans that focus on more short-term or accessible storage (S3 Standard) to those designed for long-term, barely accessed storage (S3 Glacier Deep Archive). However, the price of requests and data retrieval inversely scales - S3 Standard encourages frequent data use and interaction by having the lowest of these costs, while S3 Glacier Deep Archive comes with almost all of the highest charges for retrieval and requests.

Basically, the pricing structure of AWS S3 heavily encourages users to prioritize their data storage according to usage. The more often you access your data (and so end up on a plan that reflects this), the more you’ll pay per-GB stored, and vice versa.

With that out of the way, let’s cover some basic tips that you can use to reduce your basic S3 costs.

5 tips to manage basic S3 costs

The first 5 tips below will introduce the basic practices you should be employing in order to manage your AWS S3 costs:

  1. Assess your needs carefully
  2. When in doubt, make use of S3 Intelligent - Tiering
  3. Don’t be afraid to change plans, but be mindful of timing
  4. Reduce requests and data retrieval where possible
  5. Know your charges inside and out

Managing AWS S3 Costs Tip 1: Assess your needs carefully

Source from sk-cert.sk, image used under license CC BY 3.0

Any effort to manage or assess your AWS costs (including those related to S3) has to start with you knowing what products, services, and options are best suited for you. For EC2 instances you need to know at least roughly which EC2 instance types will serve your purposes without resulting in you paying for something you don’t need. For S3 you need to know which storage plan you should use for different projects.

Put it this way: if your standard operating procedure is to provision every S3 bucket at the Standard tier without regard for the purpose of its contents, your costs are not optimized.

Considering that we’ve covered the types of use cases that each S3 pricing plan is suited to before, we won’t belabor the point here too much. However, to give you a quick overview:

  • S3 Standard is suited to anything that needs to be highly available and durable, such as a mobile game, app, public website, or frequently analyzed logs
  • S3 Standard - Infrequent Access balances lower storage and request costs with a small increase in retrieval charges, therefore lending itself to longer-term storage and primary backups
  • S3 One Zone - Infrequent Access is mostly useful for secondary backups, as retrieval speed and reliability are sacrificed a little to reduce costs
  • S3 Glacier Instant Retrieval is good for data archiving, as it further reduces the cost of storage while also providing an extremely short data recovery time 
  • S3 Glacier Flexible Retrieval is much like the previous tier but with higher retrieval time and lower storage costs, which means that it’s best used for long-term storage, data archives, and storing data for compliance reasons
  • S3 Glacier Deep Archive is ideal for data that you won’t need to access more than once or twice per year, such as anything you may have previously stored on magnetic tapes
  • S3 Intelligent - Tiering is a catch-all storage class management solution that automates class selection for you. It really shines with data that varies in how often you access it, as it will automatically be moved onto the cheapest plan based on your usage.

Knowing what category your data falls into in advance can save you a large amount of money going in, as you won’t be spending more than you have to simply because you’re on a sub-optimal storage plan.

Managing AWS S3 Costs Tip 2: When in doubt, make use of S3 Intelligent - Tiering

If you aren’t sure as to which S3 storage class to use, S3 Intelligent - Tiering is a great middle ground to offer you cost optimization with much less risk. It’s also perfect for any data to which your access needs and frequency changes, as it will automatically shift your data to the plan that’s most optimized for your current usage.

It’s not perfect. S3 Intelligent - Tiering could save you money by shifting your data onto a lower-costing plan, but you’ll have to pay a small sum for the privilege of that automatic management. Still, it’s better than losing money by setting your data onto a plan that doesn’t suit it and slowly building up excess costs. Plus, tier transition is a slow process, since Intelligent Tiering doesn’t know the difference between one piece of data and another. In the case of an object that you know is accessed once yearly, you’d be better off sending that object back down to a cold tier manually than waiting for Intelligent Tiering to pass it off down the lane over a period of months.

This plan is also a good option to consider if you simply don’t have the time, energy, or expertise to manually manage your S3 storage plans. You won’t save as much money as you would by doing it manually, but you can be sure that you’re going to consistently be moved to a good option for your data storage needs.

Managing AWS S3 Costs Tip 3: Don’t be afraid to change plans, but be mindful of timing

Source, image in the public domain

With some exceptions, changing storage classes is a cheap process. If you compare the pennies and dollars you may be charged for tier transition charges to the expensive per GB charges at hot tiers or retrieval charges at cold tiers, changing tiers is a cheap no-brainer.

Don’t set your data on a particular plan and then assume that it’s always going to be the best option. Even if you start out on the best storage plan for your needs, those needs (and thus the best plan for you) can change over time and should be revisited every so often.

Keep in mind, these changes need to be planned and deliberate because all manually-configured non-Standard tiers have minimum retention duration policies. If your data is not retained at that class level for the minimum duration, you’ll be charged as if it stayed for that full period when you move it to a different tier.

So, even if it’s once per year, it’s good to check in on your data’s storage plans on S3 and see if you could stand to gain by switching to something different.

Managing AWS S3 Costs Tip 4: Reduce requests and data retrieval where possible

It’s worth emphasizing that retrieval and request costs can add up, both directly and indirectly. While each of these S3 actions incurs its own cost, the frequency of these actions dictate the appropriate storage class for a data set, which means that frequently accessed S3 data needs to sit in an expensive “hot” storage tier. Which begs the question: do you really need to be querying this data?

Let’s use a real-world example. Imagine you retain a record of software performance statistics in S3 that you use for a metrics monitoring dashboard. You started recording and retaining these statistics when you first launched the software in 2015, which gives you incredible insights into historical performance. 

While it might be helpful to query the full dataset in your S3 bucket on a minute-by-minute basis to ensure the validity of the dashboard representation, most likely the old data hasn’t changed. S3 costs could be meaningfully reduced if you adjusted your code to query only the most recent data, ignoring datasets determined by you to be final and retaining those values in the database without the intention of updating them.

Once that change is made, you can choose to implement Intelligent Tiering to push the datasets slowly into colder storage to gain even greater S3 savings, or consider sending them immediately down to Deep Archive once regular querying is terminated.

We know that changing your approach to S3 requests and data retrieval can require rewriting legacy code. It’s far from possible to just reduce your requests and data retrieval practices in the AWS infrastructure console. If it were, we’re sure that Amazon would have incorporated it into their Intelligent offerings.

Yet the fact stands that if you are able to cut out any unnecessary requests or data retrieval you won’t just save money by removing those (potential) charges from your current plan. It could even mean that the storage savings from, say, one of the Glacier plans kicks in enough to make them your new cheapest option.

Managing AWS S3 Costs Tip 5: Know your charges inside and out

One of the easiest mistakes to make when managing any kind of cost is not knowing what your charges should look like. It’s true with S3 as, if you don’t know how much you should be paying for your data storage, you’re not going to be able to see when costs are much higher than normal.

This tip isn’t even directly related to your S3 usage - what matters is that you know the figures behind your usage so that you can tell what “normal” should look like. If you see that your latest monthly data retrieval charges are 5x what they have been for the past 2 years, you’ll know that you need to investigate and maybe change data storage plans to prevent that from being the new norm.

The bonus S3 costs

Source, image in the public domain

The hardest part about managing AWS S3 costs is tracking and optimizing what we’ll call the “bonus” costs. These are the charges that aren’t directly part of the S3 storage classes and don’t change at all if you’re on a different storage class. Some aren’t even mentioned on Amazon’s official S3 pricing page, which is why these can also be considered “hidden” charges. This includes:

  • Data transfer
  • Management features and analytics
  • Replication costs
  • S3 Object Lambda
  • Early retrieval penalties

It’s hard to pin down these charges at the best of times thanks to how complicated your Cost and Usage Reports (CURs) can be, let alone taking action in optimizing them. How can you start to improve if you don’t even know how much of your S3 charge is coming from your base storage plans and how much is the result of data transfer operations that are running out of control?

The answer, thankfully, is below.

6 tips to manage bonus S3 costs

We’re on the last stretch - it’s time to round out with 5 more tips on how to manage your S3 costs. These ones focus on dealing with S3’s bonus charges:

  1. Align your locations to avoid data transfer costs
  2. Consider hosting in a cheaper Region
  3. Compare the cost of content mirroring
  4. Use Amazon CloudFront
  5. Limit feature usage where possible
  6. Set lifecycle policies to comply with minimums

Managing AWS S3 Costs Tip 6: Align your locations to avoid data transfer costs

One of the most important things to remember about data transfer costs in AWS is that they’re often only related to data from AWS being transferred out to the internet, or data being transferred between two different AWS Regions. See our post on data egress for more information about that.

The same holds true with S3, as you aren’t charged at all for transferring data between your S3 buckets or for transferring data into another AWS service that shares the same Region as your S3 bucket. So, by making sure that all of your AWS services are located in the same Region (as long as this doesn’t negatively affect performance too much) you can cut out all of those nasty related data transfer charges.

Managing AWS S3 Costs Tip 7: Consider hosting in a cheaper Region

Source, image in the public domain

Much like the previous tip, data transfer charges between AWS Regions depend entirely on the locations themselves. While this mostly relates to internet acceleration charges for data traveling through S3 Multi-Region Access Points, you can still save a lot of money over the years by migrating to a Region that has lower transfer charges.

It’s not always possible, but it’s a free saving that’s worth picking up if you can.

Managing AWS S3 Costs Tip 8: Compare the cost of content mirroring

Rather than constantly transferring data between Regions and incurring costs every time you do so, sometimes it can work out to be cheaper to mirror your data in the other Region and simply transfer any updates to that data set.

This would mean incurring storage charges in that Region so you’ll need to run the numbers yourself, but this can be particularly useful for pushing small updates to large data sets.

Managing AWS S3 Costs Tip 9: Use Amazon CloudFront

It sounds simple, but there are no costs for transferring data from an S3 bucket out to Amazon CloudFront. Check out our post detailing CloudFront’s pricing if you don’t believe us!

While S3 only allows for 100 GB of free data transfer out to the internet per month, CloudFront ups that limit to 1 TB, letting you get 10x as much data transferred out before you have to start paying for it. The tool itself is also mostly free, so you’re not incurring any extra charges by doing this!

Managing AWS S3 Costs Tip 10: Limit feature usage where possible

Another way to reduce your bonus S3 costs is to know which data sets require you to utilize extra services and features (such as paid analytics), and which you can live without. You won’t get charged for anything that you don’t use, so, naturally, cutting your usage of Amazon S3 Inventory, S3 Storage Lens’ advanced metrics, and so on is a great way to make a tidy saving.

BONUS:

Managing AWS S3 Costs Tip 11: Set lifecycle policies to comply with minimums

The last (easy) way to tackle bonus S3 costs comes in handy when you’ve chosen to implement a custom lifecycle policy or manually assign a “cold” storage class. Since every non-S3 Standard storage class has a minimum duration policy, any adjustment you make to a storage tier before the minimum duration has ended will incur a charge equal to the cost to store that data for the remainder of the duration. That means you can get double-billed for up to 90 days! 

To avoid this, make sure every custom lifecycle policy is configured to change tiers only after the minimum duration of the previous tier has passed.

Managing AWS S3 costs the easy way

Half of the battle when managing AWS S3 costs is knowing what you’re paying and whether you should be paying that much. The other half is understanding how to reduce and optimize your bills beyond your normal levels.

That’s why Aimably exists.

Meanwhile, with our Public Cloud Cost Reduction Assessment you’ll never have to worry about the confusing details of every pricing plan and savings opportunity available. We’ll analyze your business and AWS accounts to assess their efficiency in relation to each other, and combine that with our own expertise to present all of the available cost-saving opportunities to you with a cost and benefit assessment already baked in. With our proprietary S3 recommendation engine, we’ll tell you exactly which configuration will save you the most, without you having to master all the details.

If you’re looking to manage your AWS S3 costs effectively, you can’t go wrong with Aimably.

AWS Total Cost of Ownership