Learn to run containers on ECS Fargate and functions on Lambda, expose them with API Gateway, and choose the right compute model for each workload.
The payments team at acme-orders ships a Docker image for orders-api.
Every container you run on ECS pulls its image from a registry.
If you know Docker, ECS adds very little that is new. Most concepts map straight onto commands you already run.
A service on its own has no public entry point.
Lambda runs your function when an event arrives. You upload code, choose a trigger, and AWS provides the compute.
A cold start is the delay when Lambda has to create a new execution environment: download the code, start the runtime, and run your initialization...
The payments team at acme-orders ships a Docker image for orders-api.
Every container you run on ECS pulls its image from a registry.
If you know Docker, ECS adds very little that is new. Most concepts map straight onto commands you already run.
A service on its own has no public entry point.
Lambda runs your function when an event arrives. You upload code, choose a trigger, and AWS provides the compute.
A cold start is the delay when Lambda has to create a new execution environment: download the code, start the runtime...
By default, Lambda runs outside your VPC.
A Lambda function has no public address by default.
None of these replace each other. They fit different durations, traffic shapes, and control needs.
You will build a small app, run it on Fargate, break it with a permission mistake, fix it, and then build a Lambda...
Quick reference Common mistakes Putting application permissions on the ECS execution role is the most common ECS...
Roles that use the skills in this module.
Cloud Engineer
DevOps Engineer
Solutions Architect
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetThe execution role is used by ECS itself to pull your image from ECR and write logs, before your code starts. The task role is used by your application code to call AWS services like S3 or DynamoDB. If the task will not start, check the execution role. If your app gets AccessDenied, check the task role.
Choose Lambda for short, event-driven work that finishes within 15 minutes and may sit idle for long periods. Choose Fargate for services that run continuously, hold open connections, or need steady resources. The shape of the workload decides, not personal preference.
Only for Java. For Python and .NET, SnapStart charges for caching the snapshot and for each restore. Old published versions keep accruing cache charges, so delete versions you no longer use.
A function attached to a VPC uses your subnets, and it gets no public IP. It needs a NAT gateway, or VPC endpoints for the AWS services it calls, to reach anything outside the VPC.