docker-lambda icon indicating copy to clipboard operation
docker-lambda copied to clipboard

AWS Lambda container!

Open vincentsarago opened this issue 3 years ago • 5 comments

https://aws.amazon.com/fr/blogs/aws/new-for-aws-lambda-container-image-support/

vincentsarago avatar Dec 01 '20 18:12 vincentsarago

if the containers are based on amazonlinux2 we can simply do

FROM lambgeo/lambda-gdal:3.2-al2

FROM public.ecr.aws/lambda/python:3.8

# Bring C libs from lambgeo/lambda-gdal image
COPY --from=gdal /opt/lib/ /opt/lib/
COPY --from=gdal /opt/include/ /opt/include/
COPY --from=gdal /opt/share/ /opt/share/
COPY --from=gdal /opt/bin/ /opt/bin/
ENV \
  GDAL_DATA=/opt/share/gdal \
  PROJ_LIB=/opt/share/proj \
  GDAL_CONFIG=/opt/bin/gdal-config \
  GEOS_CONFIG=/opt/bin/geos-config \
  PATH=/opt/bin:$PATH

vincentsarago avatar Dec 01 '20 18:12 vincentsarago

The more I think about it, the more I think this is a documentation issue. We will just need to explain how to build the container with the snipset ☝️

vincentsarago avatar Dec 01 '20 18:12 vincentsarago

And maybe an example too...

kylebarron avatar Dec 01 '20 18:12 kylebarron

The more I think about it, the more I think this is a documentation issue. We will just need to explain how to build the container with the snipset point_up

They also allow debian containers. Why not use the original gdal container and just include AWS' Lambda Runtime?

meyer1994 avatar Dec 01 '20 19:12 meyer1994

@meyer1994 by using your own container (read here, not built from the official amazonlinux image), you'll need to add the lambda API. That's another solution which could also be 👌.

vincentsarago avatar Dec 01 '20 19:12 vincentsarago