Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build AWS Lambda Layers for Python runtime. A solution for Layers that contains cryptography library.

License

Notifications You must be signed in to change notification settings

gmuslia/build-lambda-layer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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/gmuslia/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
$ ./build-lambda-layer.sh pyOpenSSL
$ ./build-lambda-layer.sh pandas
$ ./build-lambda-layer.sh confluent-kafka

About

Build AWS Lambda Layers for Python runtime. A solution for Layers that contains cryptography library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 62.9%
  • Dockerfile 37.1%