Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.15 KB

README.md

File metadata and controls

29 lines (22 loc) · 1.15 KB

Build AWS Lambda Layers for Python runtime

An easy way to build AWS Lambda Layer for Python runtime.

Solution for AWS Lambda Layer that contains cryptography library.

AWS Lambda Layers built on Mac OS that contain cryptographypackage will result in an error.

ImportError: /var/task/cryptography/hazmat/bindings/_constant_time.so: invalid ELF header

cryptography contains native code and that code is compiled for the architecture of the current machine. AWS Lambda needs Layers compiled as linux ELF shared objects.

Prerequisites

Install Docker on your local machine.

Installation

Clone this repo to your local machine.

$ git clone https://github.com/bluegridio/build-lambda-layer.git
$ cd build-lambda-layer

Usage

Run the script and provide the package name as first argument.

$ ./build-lambda-layer.sh curl