Compute · AWS SERVICE CHEATSHEET

AWS Lambda (LAMBDA)

Executes microservice functions, REST API endpoints, event handlers, and data transformations with automatic horizontal scaling.

Open Interactive LAMBDA Sandbox → Simulate in Architecture Studio

AWS Container Placement

Regional / Global Managed Scope (Outside VPC Subnets)

Summary

Serverless event-driven compute engine running code without provisioning or managing EC2 instances.

When to Use (SAA-C03)

Use for bursty APIs, event glue, and short-lived tasks (<15 min); attach to a VPC only when accessing private RDS/ElastiCache (use RDS Proxy!).

Allowed Ingress Connections & Ports

Source ServiceProtocolPortArchitectural Rationale
APIGWHTTPS / AWS-RPC443Synchronous API Gateway proxy or HTTP integration invoking function payload.
SQSEventBridge / PollEvent SourceSQS queue pollers invoking function batches automatically.
ALBHTTP / Lambda Target443Application Load Balancer invoking Lambda as target group member.

Allowed Egress Targets & Ports

Target ServiceProtocolPortData Flow Rationale
RDSTCP3306, 5432SQL database queries via private VPC subnets.
SQSHTTPS443Asynchronous event publish and Dead-Letter Queue (DLQ) failover.
S3HTTPS / Gateway Endpoint443File upload, download, and object transformation streams.

Key Configuration Parameters & AWS Best Practices

ParameterFormat / ExamplePurpose & Rationale
Memory Size (lambdaMemory) (Required)1024 MBMemory allocated to function. CPU and network throughput scale proportionally with memory. Why: AWS hardware schedulers allocate CPU slices in direct proportion to allocated memory.
Timeout (lambdaTimeout) (Required)30 secondsThe maximum duration in seconds that Lambda allows a function to run before termination. Why: Prevents runaway functions from exhausting compute quotas and incurring unexpected costs.
VPC Subnet Placement (lambdaSubnetIds)subnet-app-a, subnet-app-bSubnets in which Lambda provisions Hyperplane Elastic Network Interfaces (ENIs). Why: Required to access resources in private VPC subnets, such as RDS databases or internal endpoints.
Security Groups (lambdaSecurityGroupIds)sg-lambda-egressStateful firewall rules controlling inbound and outbound network access for the Lambda ENI. Why: Protects the VPC network and restricts database port access.

Practice Labs Using AWS Lambda

CLF-06

Tight Coupling in Transaction Processing

Decouple the architecture by placing an Amazon SQS queue between the producer and consumer.…

SAA-14

E-Commerce Flash Sale: EventBridge Dead-Letter Queue (DLQ) Delivery Blackhole

Configure the EventBridge rule to route failed execution events to sqs-order-dlq.…

SAA-20

RDS Connection Storm Exhaustion (RDS Proxy)

Insert an Amazon RDS Proxy between the Lambda functions and the RDS database to multiplex and pool database co…

SAA-21

Decouple Synchronous Order Spike with SQS + DLQ

Buffer incoming orders asynchronously using an Amazon SQS queue with a Dead-Letter Queue (DLQ) before the work…

SAA-C03-ZEROTRUST-S3-PRESIGNED

Secure Media Streaming: Zero-Trust Cognito Auth & S3 Presigned Upload

Authenticate client with Cognito User Pool, issue presigned S3 SigV4 URL via Lambda, and upload directly to en…

BUILD-02

Build: 100% Serverless Microservices REST API

Build a serverless architecture containing API Gateway, AWS Lambda, and Amazon DynamoDB, connected sequentiall…

Frequently Asked Questions

Where does AWS Lambda live inside an AWS VPC architecture?

Valid container placement: Regional / Global Managed Scope (Outside VPC Subnets). Executes microservice functions, REST API endpoints, event handlers, and data transformations with automatic horizontal scaling.

When should I use AWS Lambda on the AWS SAA-C03 exam?

Use for bursty APIs, event glue, and short-lived tasks (<15 min); attach to a VPC only when accessing private RDS/ElastiCache (use RDS Proxy!).

Can I simulate AWS Lambda packet routing without an AWS account?

Yes. CloudTracer simulates AWS Lambda along with 53 AWS services directly in your browser and exports production Terraform HCL.

More Compute Cheatsheets

EC2 Instance → Auto Scaling Group → ECS Fargate →