Hi. I’m working with a small organization that has been using S3 to store about 18 TB of data. Currently everything is S3 Standard Tier and we’re paying about $600 / month and growing over time. About 90% of the data is rarely accessed but we need to retain millisecond access time when it is (so any of Infrequent Access or Glacier Instant Retrieval would work as well as S3 Standard). The monthly cost is increasingly a stress for us so I’m trying to find safe ways to optimize it.
Our buckets fall into two categories:
- smaller number of objects, average object size > 50 MB
- millions of objects, average object size ~100-150 KB
The monthly cost is a challenge for the org but making the wrong decision and accidentally incurring a one-time five-figure charge while “optimizing” would be catastrophic. I have been reading about lifecycle policies and intelligent tiering etc. and am not really sure which to go with. I suspect the right approach for the two kinds of buckets may be different but again am not sure.
Most people in this org are non-technical so trading off a more tech-intensive solution that could be cheaper (e.g. self-hosting) probably isn’t pragmatic for them.
Any recommendations for what I should do? Any insight greatly appreciated!
Related discussions:
I would put the big objects on intelligent tiering, alternatively standard-infrequent access if you are sure they will truly be accessed infrequently.
For the smaller objects I would keep them in the standard tier to avoid monitoring costs and the minimum file size used for charges on standard-infrequent access.
Is it possible to batch the smaller files together in zip files? Or Dou you need to be able to access them individually?
And are you using the AWS non-profit credit program?
Thank you! I will have to look into whether we are using the credit program. We do unfortunately access the individual files. There might be an approach to store the zips and unarchive them on-demand but that’s a more labor intensive approach and won’t help us for the stuff already stored (I don’t think).
Are you using cold storage? Using files intensively? how often do the files access? are documents or other types of files
Skip intelligent tiering. Go straight to a static policy with a life cycle rule that moves everything to IFA after 30 days or to glacier after the 30 days.
Thank you for the reply. I can see doing this for the first type of bucket, while my concern for the second type with millions of smaller objects is the potential one time cost of applying those lifecycle rules. Is that something I should be concerned about?
For most of our data the fastest cold storage access time of 1-5 minutes would not meet our needs. Most of the data is rarely accessed (0-1 times per year in many cases) but we need millisecond (well, “multisecond” would probably work if it existed) access time when we do. These are binary files.
Yes it is, you get a cost bump when your turn on intelligent turning as it now needs to monitor objects last access. It will go through every resource in the bucket IIRC.
Yes it is, you get a cost bump when your turn on intelligent turning as it now needs to monitor objects last access. It will go through every resource in the bucket IIRC.
Maybe look into a cheaper alternative S3-compatible provider like Wasabi?
Thanks for the suggestion. That could be an alternative at some point although the process of getting all our data back from AWS would not be trivial (I suppose we would use Snowball?) and we’d have to update our systems to use a different cloud provider.
There is a point: Wasabi uses the same API as S3 does. So almost no updates in the system
Static policy will be a one time cost, where as intelligent tiering will be on going cost.
Good advice. I’d add that you could also setup rules to put files in Glacier Instant retrieval, if they haven’t been accessed more than a few times a year.
If your files are all in a single bucket or folder, you might want to also look at restructuring them. As an example, if the likelihood of a file being accessed decreases based on a time-based event (age, client-based, etc.), then setting up a structure will allow you to act on batches of files with greater certainty that you won’t impact files that need to be more accessible.
A question to experts: Is it possible to combine smaller objects into larger objects and put a lambda between the client and S3? The lambda can unzip the larger object and return back the part of data requested? And API gateway + Lambda combination?
I was wondering about something like this above thread. It might be something we could look at for new data going forward. We’d still have the legacy data to deal with but we would slow the growth in cost over time.
What exactly are you storing?
I’m uncertain if lambda supports local storage for downloading a file and re-serving it. It might, I just don’t know.
That said, Batch could absolutely be used to download s3 file, unzip/untar it into ephemeral storage, process it and then exit.
You’d just need to convert the lambda function code into a container that executes the code instead.
It’s not “hand wavy” easy, but it can be well orchestrated.
AWS had a ruling against them recently that will be of interest here:
https://aws.amazon.com/blogs/aws/free-data-transfer-out-to-internet-when-moving-out-of-aws/
Wasabi’s price structure is pretty good for what they offer.