demondehellis

Full-Stack Wizard, Tech Guru & Bash Evangelist.

← Back to blog

S3 Storage for a Static Website

Published: March 20, 2025

  • #dev
  • #blog
  • #s3
  • #cloud

Where do you keep images and video for a blog if you’re a developer and don’t want to fuss with a server? A few words about cloud object storage and S3-compatible services.

I have another blog that’s more travel-oriented, and it became alarmingly heavy the moment I started stuffing it with trip photos from Thailand. It quickly grew into a respectable gigabyte. And even in a technical blog, sometimes you want to drop in a screen recording GIF or something similar - which also weighs quite a bit. Better to think ahead about where all this stuff will live, so you don’t end up replacing links all over the site later when GitHub decides your swollen static website is no longer amusing.

AWS S3

AWS S3 is Amazon’s cloud file storage, used by every second IT company on Earth. Thousands of services are built on top of it. S3 lets you create public buckets, meaning you can upload HTML files and use it as hosting for a static site. You can even attach your own domain and enable SSL. AWS also has the aws-cli utility, which lets you upload static files from the terminal in a single command.

The AWS idea seems perfectly reasonable to me. S3 is such a fundamental piece of infrastructure that it’s basically in the same category as GitHub. Amazon, like Microsoft, has every chance of outliving all of us. You do have to pay for S3, but not much. Quite possibly you can top up the account with $10 once and forget about it. For a text-heavy blog with a modest number of images, that could last a hundred years. For a heavier blog up to 100 GB, maybe five years - which is still cheaper than just about any VPS or hosting plan.

The problem is that AWS is not designed for humans. Interfaces, permissions, roles, policies - all of that is preferable to understand before touching anything, unless you enjoy avoidable disasters. S3 itself is not the scariest part, sure, but even basic file access configuration raises questions if you don’t deal with it every day. On top of that, they have a whole zoo of storage classes with different pricing and access speeds, and you need to make sense of that too. So yes, it’s a working option, just not the friendliest one.

Prices: aws.amazon.com/ru/s3/pricing

S3-compatible storage

The protocol behind Amazon S3 became so popular that many other companies started offering compatible services. Quite often even aws-cli works with them just fine. On top of that, AWS S3 has SDKs and clients for basically every language and platform, and those will often work here too, fully or partially.

Of the ones I’ve tried - Cloudflare and… Yandex. Yes, both companies are building cloud platforms in AWS’s image and likeness. At Yandex it’s called Object Storage, and at Cloudflare it’s R2.

One thing to keep in mind: S3 is not a file system. If, for example, you rename a folder containing hundreds of files, under the hood that’s copy + delete, not some magical instant path update. I got burned by this once: renamed a folder with a few hundred files, and the client froze for a couple of hours.

On macOS I set up Mountain Duck and Commander One to connect to buckets and upload photos over S3. Though most of the time I still do it from the terminal. But for most people a UI is probably more comfortable.

There are other storage providers too. Google has Google Cloud Storage, for example - it uses its own protocol, but the principle is the same: buckets, policies, cheap object storage.

Cloudflare R2

Cloudflare has one of the nicest admin panels among all providers. And on top of that, Cloudflare R2 doesn’t charge for egress traffic - which is already a killer feature for file storage. Super convenient for blog images and video: you don’t have to worry that a sudden spike in popularity will result in a $300 bill.

They also have a free tier: you can store up to 10 GB per month for free.

For images, they have Cloudflare Images, where you can store and optimize pictures, generate previews, and so on. And naturally they include a CDN, so your files are served from the data center closest to the user. Other providers have CDNs too, of course, but Cloudflare’s is much more user-friendly and easier to configure.

Prices: developers.cloudflare.com/r2/pricing

Yandex Object Storage

Basically the same story as Amazon: buckets, static website publishing, the usual object storage package. Advantages for Russian-language projects include billing in rubles and servers located in Russia, which can be convenient.

The downside is compatibility quirks. Yandex docs say you can use AWS CLI because the protocol is compatible. In practice, for example, the sync command didn’t work back when I tested it.

I also hit another issue once: a newer AWS CLI version used S3v4 by default, while Yandex only supported S3v3 at the time, so I was getting bizarre errors when trying to upload or read anything. The fix was downgrading the protocol version in config, but the docs said nothing about it. They updated their protocol support later, of course, but at the time I had to waste time on this nonsense, which was mildly irritating. Overall the service is fine, but there are nuances.

Prices: yandex.cloud/ru/docs/storage/pricing


There are plenty of other services too, choose whatever fits your taste and your tasks. I’d personally pick AWS only if you already have experience with it and already run other infrastructure there. Cloudflare is great for most people: convenient, with generous free quotas. And Yandex mostly makes sense for Russian-language projects.