# Lambda container images

> Worse cold starts, and they break Cognito triggers. I stopped using them.

- Verdict: Never
- Vendor: AWS
- Layer: [Compute](https://cloudlesslabs.com/stack/layers/compute.md)
- Last reviewed: 18 October 2026, by Nicolas Dao (Cloudless Labs, Sydney)
- Web page: https://cloudlesslabs.com/stack/aws-lambda-container-images/. The whole stack in one file: https://cloudlesslabs.com/stack/brief.md

I tried them and went back to zip packages. The cold starts are worse, and the failure mode with Cognito triggers is a user who can't sign in.

## Don't use it when

- Always, unless you genuinely need a 10 GB image or a runtime Lambda doesn't offer.

## In my words: what hurts

- Worse cold starts than zip packages.
- Deleting the image can break the function.
- With Cognito triggers, an idle container Lambda times out on reconnect and Cognito sign-in fails.

## Gotchas, with fixes

- **Gotcha:** Cognito gives trigger functions about 5 seconds. A cold container image can blow through that.
  **Fix:** Keep Cognito triggers small, zip-packaged and Node.js.

## Provisioning

Official Pulumi package · Official Terraform provider

## Use instead

Zip-packaged Lambda functions, or Fargate when you really need a container.

## Alternatives

- [AWS Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md): Zip-packaged functions.
- [Fargate scheduled tasks](https://cloudlesslabs.com/stack/aws-fargate-scheduled-tasks/index.md): You really need a container.

## Where it fits

- [A job that runs for hours](https://cloudlesslabs.com/stack/use-cases/long-job.md): don't. Not a workaround for long jobs: a container image still stops at Lambda's 15 minutes, with worse cold starts. If it needs a container and hours, run it on Fargate. Instead: [Fargate scheduled tasks](https://cloudlesslabs.com/stack/aws-fargate-scheduled-tasks/index.md).

## Related

- [Compute](https://cloudlesslabs.com/stack/layers/compute.md): every tool in this layer, with its verdict
- [The whole stack in one file](https://cloudlesslabs.com/stack/brief.md): every use case and tool, for questions that span many
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
