Execution model and triggers
AWS Lambda is event-driven: functions run in response to events such as file uploads, scheduled tasks, or HTTP requests. Each invocation runs in an isolated execution environment and must be triggered by an event source. Lambda enforces a maximum execution duration of 15 minutes (900 seconds).
Resource allocation: memory, CPU, and network
Memory is a primary configuration knob for Lambda and drives CPU and network performance. You set memory between 128 MB and 10,240 MB (increments of 1 MB). As memory increases, Lambda proportionally provides more CPU capacity and higher network throughput. Key points:- Memory range: 128 MB — 10,240 MB.
- CPU scales with memory. A practical approximation is ~1 vCPU per 1,792 MB (1.792 GB); at 10,240 MB you approach roughly six vCPUs.
- Network bandwidth scales with memory and CPU; higher-memory functions achieve greater throughput.

Execution time, cold starts, and warm instances
Lambda timeout is configurable from 1 to 900 seconds. If your workload routinely needs >15 minutes, use containers or VMs. Cold starts:- Occur when Lambda must provision a new execution environment or initialize a runtime (language runtime, dependencies).
- Add latency—commonly a few hundred milliseconds to several seconds depending on runtime, package size, and initialization complexity.
- After an invocation, Lambda may keep the execution environment warm (often 5–15 minutes, not guaranteed). Subsequent invocations on a warm instance avoid the cold-start penalty.

Invocation models
Lambda supports several invocation patterns; choose based on latency, durability, and processing needs.
Stream-based event source mapping allows batch processing and checkpointing; it changes scaling and retry semantics compared to single-event invocation.
Networking and I/O
Network and I/O performance scale with memory/CPU settings. For network- or I/O-bound workloads, increase memory to gain higher throughput. Monitor bandwidth-sensitive operations (large uploads/downloads, external API calls) and size memory accordingly.
Concurrency, throttling, and scaling behavior
Concurrency controls how many function instances run simultaneously. AWS enforces account- and region-level concurrency quotas.- Default regional concurrency quota: typically 1,000 concurrent executions (request increases via AWS Support).
- Lambda supports burst scaling; the burst capacity and burst behavior vary by region.
- Reserved concurrency: allocate a fixed concurrency pool to a function to guarantee capacity and isolate it from other functions.
- If you reserve the entire account concurrency for one function, other functions will be throttled.
- Throttling occurs when concurrent executions exceed available concurrency; use retries with backoff in client code.

Availability and fault tolerance
Lambda is managed across Availability Zones in a Region. AWS provides redundancy for the service, but application-level design must handle partial failures:- Lambda will run execution environments across AZs; retries or re-invocations may be necessary depending on your event source and invocation model.
- Design idempotent handlers and implement error handling/retry strategies for asynchronous events and stream-based processing.

Runtimes, package sizes, and storage
Lambda supports many runtimes (Python, Node.js, Java, .NET, Go, Ruby, Rust) and custom runtimes. Deployment and storage limits:
For large dependencies, prefer container images (up to 10 GB) or use Lambda layers. Use EFS or S3 for persistent or shared storage.
Other operational considerations
- Throttling: implement retries and exponential backoff for robust clients.
- Cold starts: matter for latency-sensitive workloads — use Provisioned Concurrency when low-latency is required.
- Payload/response limits: integrations (e.g., API Gateway) impose their own size limits; for large data, use S3/EFS or streaming patterns.
Exam tip: remember the 15-minute timeout (900 seconds), the approximate memory-to-CPU mapping (~1 vCPU per 1,792 MB), the default regional concurrency quota (typically 1,000), and that container images can be up to 10 GB.
Summary
AWS Lambda offers a highly managed, event-driven compute platform with fast scaling and a low operational footprint. The primary trade-offs:- 15-minute execution limit
- Cold-start latency (unless using Provisioned Concurrency)
- Memory is the primary performance dial (affects CPU and network)
- Concurrency quotas and throttling need capacity planning
- Stateless execution requires external persistence
Links and references
- AWS Lambda — Overview: https://aws.amazon.com/lambda/
- Provisioned Concurrency: https://docs.aws.amazon.com/lambda/latest/dg/provisioned-concurrency.html
- AWS Lambda quotas (limits): https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
- Amazon Kinesis: https://docs.aws.amazon.com/kinesis/latest/dev/introduction.html
- DynamoDB Streams: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html
- Amazon EFS: https://docs.aws.amazon.com/efs/latest/ug/what-is-efs.html
- Amazon S3: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html