Skip to content
This repository was archived by the owner on Oct 21, 2019. It is now read-only.
This repository was archived by the owner on Oct 21, 2019. It is now read-only.

Correct paths resulting package.zip #17

Open
@meyer1994

Description

@meyer1994

I had some trouble creating a layer using the script at this repo.

According to AWS documentation, contents of package.zip will be extracted to /opt. So the correct environment variables, GDAL_DATA, and my inclusion, PROJ_LIB, should point to /opt/gdal and /opt/proj. I have included the PROJ_LIB variable to avoid the proj.db not found error.

Besides, for the python packages, instead of zipping them to the root address of the zip file, we should zip them to a python directory at root level.

In the end, it should look like this:

package.zip
├── bin     # executables
├── lib     # libraries
├── lib64   # libraries 64-bit
├── python  # python packages
└── share   # shared libraries

And last, installing rasterio with --no-binary raises the error of rasterio._shim module not existing. Installing with pip install rasterio fixes it. Also, I do not think is necessairy to install rasterio[s3] because boto3 is already included in python Lambdas by default.

After doing all the changes I have mentioned above, I've successfully created a layer that I am currently using.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions