Skill 1.2.7

Use Lambda functions to process and transform data in near real time

Key Concepts

Typical patterns include processing files as soon as they land in S3 (resizing images or parsing CSVs), reading Kinesis or DynamoDB Streams records in batches to update aggregates or other systems, and transforming records inside Amazon Data Firehose before delivery. For streams, the batch size and batching window balance latency against cost, and the parallelization factor lets several batches from one shard be processed at once.

Event source mappings support filtering, so only matching records invoke the function, and tumbling windows let a function aggregate data over fixed time periods. Functions that write back to the same S3 bucket or queue that triggers them must avoid infinite loops, for example by using a different bucket or prefix; Lambda's recursive loop detection stops some loops automatically.