[gdal-dev] AWS Lambda layer with GDAL python bindings

Ari Jolma ari.jolma at gmail.com
Wed Feb 8 07:44:54 PST 2023


On that page there are a number of arns for lambda layers, but when I 
try to get the http location of those I get from

aws lambda get-layer-version-by-arn --arn 
arn:aws:lambda:us-east-1:552188055668:layer:geolambda-python:3 --query 
Content.Location --output text

An error occurred (AccessDeniedException) when calling the 
GetLayerVersionByArn operation: User: <removed> is not authorized to 
perform: lambda:GetLayerVersion on resource: 
arn:aws:lambda:us-east-1:552188055668:layer:geolambda-python:3 because 
no resource-based policy allows the lambda:GetLayerVersion action

And I have an admin access to one AWS account.

How do I get those layers?

Ari

Joe Lee kirjoitti 8.2.2023 klo 16.35:
>
> This worked quite well in 2019 with a few hacks:
>
> https://github.com/developmentseed/geolambda
>
> *From: *gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of Ari 
> Jolma <ari.jolma at gmail.com>
> *Date: *Wednesday, February 8, 2023 at 1:42 AM
> *To: *gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
> *Subject: *[gdal-dev] AWS Lambda layer with GDAL python bindings
>
> Hi,
>
> I need an AWS Lambda layer with GDAL python bindings, for "from osgeo
> import gdal", but it seems difficult to make such a layer.
>
> In fact all I need is gdal.Open and gdal.BuildVRT - I have not dug
> deeper into rasterio, can it do those?
>
> Anyway, I installed GDAL on a machine with python 3.8 as that's what to
> lambda runtime will be, and from there copied files to a zip with /lib
> and /python. The /lib is for the shared objects. I have now 94 libraries
> there. The error I now get from
>
> try
>
>      from osgeo import gdal
>
> except
>
> in the lambda is
>
> ImportError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required
> by /opt/lib/libgdal.so.29)
>
> this seems to be a problem as that's the lambda's libm and not the libm
> in /lib, which I assume should work.
>
> Anybody know a solution? I tried some recipes I found from the net howto
> build such a layer but they did not work for me out of the box, so I
> tried myself.
>
> Best,
>
> Ari
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230208/b69d8921/attachment.htm>


More information about the gdal-dev mailing list