Amazon S3 Batch Operations
A Quick Vocabulary Lesson
Before we get started and create a batch job, let’s review and introduce a couple of important terms:
Bucket – An S3 bucket holds a collection of any number of S3 objects, with optional per-object versioning. In preparation for this blog post I enabled inventory reports for one of my S3 buckets (jbarr-batch-camera) earlier this week, with the reports routed to jbarr-batch-inventory:
I select the desired inventory item, and click Create job from manifest to get started (I can also click Batch operations while browsing my list of buckets). The function will be invoked for each object, taking advantage of Lambda’s ability to scale and allowing this moderately-sized job to run to completion in less than a minute:
I can find the “Detected” messages in the CloudWatch Logs Console:
As you can see from my very simple example, the ability to easily run Lambda functions on large numbers of S3 objects opens the door to all sorts of interesting applications.
Source: aws.amazon.com