Transforming objects with S3 Object Lambda (original) (raw)
With Amazon S3 Object Lambda, you can add your own code to Amazon S3 GET
, LIST
, and HEAD
requests to modify and process data as it is returned to an application. You can use custom code to modify the data returned by S3 GET
requests to filter rows, dynamically resize and watermark images, redact confidential data, and more. You can also use S3 Object Lambda to modify the output of S3 LIST
requests to create a custom view of all objects in a bucket and S3 HEAD
requests to modify object metadata such as object name and size. You can use S3 Object Lambda as an origin for your Amazon CloudFront distribution to tailor data for end users, such as automatically resizing images, transcoding older formats (like from JPEG to WebP), or stripping metadata. For more information, see the AWS Blog post Use Amazon S3 Object Lambda with Amazon CloudFront. Powered by AWS Lambda functions, your code runs on infrastructure that is fully managed by AWS. Using S3 Object Lambda reduces the need to create and store derivative copies of your data or to run proxies, all with no need to change your applications.
How S3 Object Lambda works
S3 Object Lambda uses AWS Lambda functions to automatically process the output of standard S3GET
, LIST
, or HEAD
requests. AWS Lambda is a serverless compute service that runs customer-defined code without requiring management of underlying compute resources. You can author and run your own custom Lambda functions, tailoring the data transformation to your specific use cases.
After you configure a Lambda function, you attach it to an S3 Object Lambda service endpoint, known as an Object Lambda Access Point. The Object Lambda Access Point uses a standard S3 access point, known as a_supporting access point_, to access Amazon S3.
When you send a request to your Object Lambda Access Point, Amazon S3 automatically calls your Lambda function. Any data retrieved by using an S3 GET
, LIST
, or HEAD
request through the Object Lambda Access Point returns a transformed result back to the application. All other requests are processed as normal, as illustrated in the following diagram.
The topics in this section describe how to work with S3 Object Lambda.
Topics
- Creating Object Lambda Access Points
- Using Amazon S3 Object Lambda Access Points
- Security considerations for S3 Object Lambda Access Points
- Writing Lambda functions for S3 Object Lambda Access Points
- Using AWS built Lambda functions
- Best practices and guidelines for S3 Object Lambda
- S3 Object Lambda tutorials
- Debugging and troubleshooting S3 Object Lambda
For S3 Object Lambda tutorials, see the following:
- Tutorial: Transforming data for your application with S3 Object Lambda
- Tutorial: Detecting and redacting PII data with S3 Object Lambda and Amazon Comprehend
- Tutorial: Using S3 Object Lambda to dynamically watermark images as they are retrieved
For more information about standard access points, see Managing access to shared datasets in general purpose buckets with access points.
For information about working with buckets, see General purpose buckets overview. For information about working with objects, see Amazon S3 objects overview.