AWS Lambda and Fargate Scale differently. Read How!!

AWS Lambda and Fargate Scale differently. Read How!!

Lambda:
When a Lambda function gets invoked it starts a small container, loads our code, and executes it. It happens every time the function is triggered or invoked.
For each concurrent execution lambda creates a new container with the same code. No two executions share the same container. If more requests come in more containers are created to handle them.

Fargate:
In Fargate our app runs in a container inside a task or pod. When a request comes in the CPU and memory usage increases. Unlike Lambda, Fargate does not start a new container for each request.
Rather, multiple requests share the same container. If the CPU usage crosses a set limit due to many requests, Fargate starts a new container.

key difference:-

When lambda done execution its gonna shuts down. No traffic so no lambda running. However fargate pod or task will keep on running and listening for incoming traffic even if there is no traffic at that moment.