AWS Lambda is the serverless compute layer at the heart of many event-driven workloads. Each invocation runs inside an execution context, a runtime environment that hosts the function code, runtime, environment variables, and any initialized state. When Lambda reuses an execution context across invocations, initialization cost is amortized, but the first invocation against a new context pays a cold start penalty from downloading the code, starting the runtime, and running init code. Provisioned Concurrency, or simply minimizing package size and init logic, mitigates that latency.
Lambda has several hard limits to keep in mind. The deployment package can be up to 50 MB zipped or 250 MB unzipped for direct upload, and up to 4 GB when uploaded into /tmp via an EFS mount, which is how large files are handled. The default and maximum timeout is 900 seconds (15 minutes), so longer workflows should be decomposed, for example using Step Functions. Memory can be configured from 128 MB to 10,240 MB in 1 MB increments, with CPU and network bandwidth scaling linearly with memory. The default account-wide concurrency limit is 1,000 concurrent executions, which can be tuned via reserved concurrency or warmed up on demand via Provisioned Concurrency.
To define and deploy serverless applications, AWS SAM (Serverless Application Model) provides an open-source CloudFormation extension with simplified YAML and JSON syntax for Lambda, API Gateway, DynamoDB, SQS, and similar resources. With sam build and sam deploy, the SAM template is transformed into a standard CloudFormation stack at deploy time. SAM is the typical companion to hand-written CloudFormation for serverless workloads and lets developers express function URLs, event sources, and IAM permissions concisely.