Best practices and guidelines for S3 Object Lambda - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Best practices and guidelines for S3 Object Lambda

When using S3 Object Lambda, follow these best practices and guidelines to optimize operations and performance.

Working with S3 Object Lambda

S3 Object Lambda supports processing only GET, LIST, and HEAD requests. Any other requests don't invoke Amazon Lambda and instead return standard, non-transformed API responses. You can create a maximum of 1,000 Object Lambda access points per Amazon Web Services account per Region. The Amazon Lambda function that you use must be in the same Amazon Web Services account and Region as the Object Lambda access point.

S3 Object Lambda allows up to 60 seconds to stream a complete response to its caller. Your function is also subject to Amazon Lambda default quotas. For more information, see Lambda quotas in the Amazon Lambda Developer Guide.

When S3 Object Lambda invokes your specified Lambda function, you are responsible for ensuring that any data that is overwritten or deleted from Amazon S3 by your specified Lambda function or application is intended and correct.

You can use S3 Object Lambda only to perform operations on objects. You cannot use S3 Object Lambda to perform other Amazon S3 operations, such as modifying or deleting buckets. For a complete list of S3 operations that support access points, see Access point compatibility with S3 operations.

In addition to this list, Object Lambda access points do not support the POST Object, CopyObject (as the source), and SelectObjectContent API operations.

Amazon Web Services used in connection with S3 Object Lambda

S3 Object Lambda connects Amazon S3, Amazon Lambda, and optionally, other Amazon Web Services of your choosing to deliver objects relevant to the requesting applications. All Amazon Web Services used with S3 Object Lambda are governed by their respective Service Level Agreements (SLAs). For example, if any Amazon Web Service does not meet its Service Commitment, you are eligible to receive a Service Credit, as documented in the service's SLA.

Range and partNumber headers

When working with large objects, you can use the Range HTTP header to download a specified byte-range from an object. When you use the Range header, your request fetches only the specified portion of the object. You can also use the partNumber header to perform a ranged request for the specified part from the object.

For more information see, Working with Range and partNumber headers.

Transforming the expiry-date

You can open or download transformed objects from your Object Lambda access point on the Amazon Web Services Management Console. These objects must be non-expired. If your Lambda function transforms the expiry-date of your objects, you might see expired objects that cannot be opened or downloaded. This behavior applies only to S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive restored objects.

Working with the Amazon CLI and Amazon SDKs

Amazon Command Line Interface (Amazon CLI) S3 subcommands (cp, mv, and sync) and the use of the Amazon SDK for Java TransferManager class are not supported for use with S3 Object Lambda.