Skip to content

Fix AWS Lambda container compatibility#155

Open
moti-254 wants to merge 1 commit into
ed-donner:mainfrom
moti-254:fix/aws-lambda-container-compatibility
Open

Fix AWS Lambda container compatibility#155
moti-254 wants to merge 1 commit into
ed-donner:mainfrom
moti-254:fix/aws-lambda-container-compatibility

Conversation

@moti-254

Copy link
Copy Markdown

Fix AWS Lambda container deployment compatibility

Problem

Deployment of the container image to AWS Lambda failed with the following error:

The image manifest, config or layer media type for the source image is not supported.

This was caused by Docker image compatibility and architecture issues when building/pushing the container image for Lambda.

Changes Made

Dockerfile updates

  • Added explicit platform targeting (linux/amd64) to both build stages
  • Updated AWS Lambda Web Adapter image version
  • Ensured consistent architecture across all container stages

Build process updates

  • Standardized Docker build process for Lambda-compatible manifests
  • Disabled BuildKit during builds to avoid OCI manifest incompatibilities with AWS Lambda

Updated Dockerfile changes

FROM --platform=linux/amd64 node:22-alpine AS frontend-builder
FROM --platform=linux/amd64 python:3.12-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.1 \
    /lambda-adapter \
    /opt/extensions/lambda-adapter

Impact

  • Fixes Lambda container deployment failures
  • Ensures compatibility with AWS Lambda container runtime
  • Maintains existing local Docker workflow
  • Preserves FastAPI + Next.js deployment architecture

Deployment Notes

Builds should be run using:

$env:DOCKER_BUILDKIT=0

before executing the Docker build command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant