Using AWS S3 as a simple cache service

S3 is great for file storage, but it does so much more as well. I love using S3 as a simple caching mechanism for any stateless functions that need to save some ephemeral data to keep state.

Traditionally, you would use in-memory caching tools like Redis for this, and Redis does still have its place as it will be faster than retrieving data from S3 in almost every case. However, if milisecond performance is not a concern, S3 is a cheap, low-effort and simple to implement alternative.

Some basic caching helpers

--

--

--

Entrepreneur tech kid, co-founder of NearSt, Londoner, open source enthusiast and aspiring spare time literature geek.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

TIL/2020/12/24

How to Implement Stack Using Queues

Searching in a Javascript array like a Pro

Top 10 ES6 Features That Every Javascript Developer Should Master

Brick by Brick: Creating a Brickbreaker style game in JavaScript, CSS, and HTML Pt. 6

2 min to understand Clousers in javascript

Let’s Build a MERN Stack E-Commerce Web App

Conditionally Sort and Toggle in React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Thomas Schoffelen

Thomas Schoffelen

Entrepreneur tech kid, co-founder of NearSt, Londoner, open source enthusiast and aspiring spare time literature geek.

More from Medium

How to win cloud and influence people

Getting started with AWS lambda and serverless framework

Scheduling post deployment actions as part of a CloudFormation deploy

Connecting AWS Redshift with S3