# AWS Lambda python pacakge FROM public.ecr.aws/lambda/python:3.12 # Install Poetry (you could pin a version if you like) RUN curl -sSL https://install.python-poetry.org | python3 - # Add Poetry to PATH ENV PATH="/root/.local/bin:$PATH" # Set working directory WORKDIR /var/task # Copy Poetry files first to leverage Docker layer caching COPY pyproject.toml poetry.lock README.md ./ COPY etl/ etl/ # Install dependencies into /var/task RUN poetry config virtualenvs.create false \ && poetry install --only main --no-interaction --no-ansi # Copy app code COPY deployment/lambda/lambda_example/docker/app.py ./ # Set the CMD to your handler CMD ["app.handler"]