Skip to content

Instantly share code, notes, and snippets.

@jspinella
Created September 9, 2021 04:24
Show Gist options
  • Save jspinella/f8ef9190d905d655cce2023192c25bea to your computer and use it in GitHub Desktop.
Save jspinella/f8ef9190d905d655cce2023192c25bea to your computer and use it in GitHub Desktop.
FROM public.ecr.aws/lambda/python:3.8
# install dependencies
# mdbtools depends on unixODBC-devel and gcc-c++
# we start by enabling the EPEL package repository, which hosts the mdbtools package
RUN yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y && \
yum update -y && \
yum install -y mdbtools gcc-c++ unixODBC-devel
# add the python code to the Docker image
COPY app.py ${LAMBDA_TASK_ROOT}
# install python dependencies
COPY requirements.txt .
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
# trigger Lambda handler
CMD [ "app.handler" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment