Unboxing S3 Object Lambda

Michael Wittig – 05 May 2021

Amazon S3 Object Lambda offers a way to execute a Lambda function when someone wants to download a file (GetObject) from an S3 bucket. You can implement whatever logic you wish and return any data as the response via the WriteGetObjectResponse API. Keep in mind that the Lambda function must finish within 60 seconds and is called synchronously.

Unboxing S3 Object Lambda

Our unboxing series gives a first insight into new services or features. An unboxing is not as detailed as a service review.

How S3 Object Lambda works

The following figure shows the needed components:

S3 Security Guide

Protect your S3 buckets!

Follow four simple rules to avoid data leaking from S3. Download our S3 Security Guide!

S3 Object Lambda

Let’s look at the parts more closely:

  • S3 Object Lamda Access Point: References your Lambda function and your S3 Access Point. Block Public Access is always enabled.
  • Lambda function: Invoked when a GetObject request is made to the S3 Object Lambda Access Point.
  • S3 Access Point: Takes care of the non GetObject requests (such as ListObjects) and serves the pre-signed URL of the original file passed into the Lambda function.
  • S3 Bucket: Stores the original file (in fact, the original file could be non-existent).

In the following video, I go into more details and share code with you:

  • Introducing S3 Object Lambda
  • Use Cases
  • Demo: Generating content
  • Understanding Pricing
  • Pitfall: Keep the Lambda function running

Pricing

You pay for the following:

  • S3 Get Object API (as usual)
  • Lambda invocation
  • Lambda GB-second
  • $0.005 per GB returned via WriteGetObjectResponse
Michael Wittig

Michael Wittig

I'm an independent consultant, technical writer, and programming founder. All these activities have to do with AWS. I'm writing this blog and all other projects together with my brother Andreas.

In 2009, we joined the same company as software developers. Three years later, we were looking for a way to deploy our software—an online banking platform—in an agile way. We got excited about the possibilities in the cloud and the DevOps movement. It’s no wonder we ended up migrating the whole infrastructure of Tullius Walden Bank to AWS. This was a first in the finance industry, at least in Germany! Since 2015, we have accelerated the cloud journeys of startups, mid-sized companies, and enterprises. We have penned books like Amazon Web Services in Action and Rapid Docker on AWS, we regularly update our blog, and we are contributing to the Open Source community. Besides running a 2-headed consultancy, we are entrepreneurs building Software-as-a-Service products.

We are available for projects.

You can contact me via Email, Twitter, and LinkedIn.

Briefcase icon
Hire me