All Projects → keithrozario → Klayers

keithrozario / Klayers

Licence: other
Python Packages as AWS Lambda Layers

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Klayers

Zappa
Serverless Python
Stars: ✭ 224 (-59.78%)
Mutual labels:  aws-lambda, lambda
Aws Lambda Cpp
C++ implementation of the AWS Lambda runtime
Stars: ✭ 300 (-46.14%)
Mutual labels:  aws-lambda, lambda
Aws Auto Cleanup
Open-source application to programmatically clean your AWS resources based on a whitelist and time to live (TTL) settings
Stars: ✭ 276 (-50.45%)
Mutual labels:  aws-lambda, lambda
hyperform
⚡ Lightweight serverless framework for NodeJS
Stars: ✭ 156 (-71.99%)
Mutual labels:  lambda, aws-lambda
Serverless Rust
⚡ 🦀 a serverless framework plugin for rustlang applications
Stars: ✭ 386 (-30.7%)
Mutual labels:  aws-lambda, lambda
aws-lambda-adapter
Run web applications on AWS Lambda without changing code
Stars: ✭ 52 (-90.66%)
Mutual labels:  lambda, aws-lambda
Lambdaguard
AWS Serverless Security
Stars: ✭ 300 (-46.14%)
Mutual labels:  aws-lambda, lambda
lambda-cron
LambdaCron - serverless cron tool
Stars: ✭ 22 (-96.05%)
Mutual labels:  lambda, aws-lambda
Webiny Js
Enterprise open-source serverless CMS. Includes a headless CMS, page builder, form builder and file manager. Easy to customize and expand. Deploys to AWS.
Stars: ✭ 4,869 (+774.15%)
Mutual labels:  aws-lambda, lambda
Vandium Node
AWS Lambda framework for building functions using Node.js for API Gateway, IoT applications, and other AWS events.
Stars: ✭ 377 (-32.32%)
Mutual labels:  aws-lambda, lambda
faaskit
A lightweight middleware framework for functions as a service
Stars: ✭ 24 (-95.69%)
Mutual labels:  lambda, aws-lambda
Mangum
AWS Lambda & API Gateway support for ASGI
Stars: ✭ 475 (-14.72%)
Mutual labels:  aws-lambda, lambda
lambda-smush-py
Gain additional code space via cheeky compression for Python AWS Lambda functions defined in-line to CloudFormation templates.
Stars: ✭ 17 (-96.95%)
Mutual labels:  lambda, aws-lambda
Aws Serverless Samfarm
This repo is full CI/CD Serverless example which was used in the What's New with AWS Lambda presentation at Re:Invent 2016.
Stars: ✭ 271 (-51.35%)
Mutual labels:  aws-lambda, lambda
aws-lambda-edge-basic-auth-terraform
A Terraform module that creates AWS Lambda@Edge resources to protect CloudFront distributions with Basic Authentication.
Stars: ✭ 18 (-96.77%)
Mutual labels:  lambda, aws-lambda
Aegis
Serverless Golang deploy tool and framework for AWS Lambda
Stars: ✭ 277 (-50.27%)
Mutual labels:  aws-lambda, lambda
nuxt-on-lambda
Nuxt.jsをAWS Lambdaで動かす
Stars: ✭ 78 (-86%)
Mutual labels:  lambda, aws-lambda
twitter
A serverless social network that's under development with some cool stuff, such as Serverless Framework, AppSync, GraphQL, Lambda, DynamoDB, Cognito, Kinesis Firehose, and Algolia ☁️
Stars: ✭ 29 (-94.79%)
Mutual labels:  lambda, aws-lambda
Grant
OAuth Proxy
Stars: ✭ 3,509 (+529.98%)
Mutual labels:  aws-lambda, lambda
Serverless Express
Run Node.js web applications and APIs using existing application frameworks on AWS #serverless technologies such as Lambda, API Gateway, Lambda@Edge, and ALB.
Stars: ✭ 4,265 (+665.71%)
Mutual labels:  aws-lambda, lambda

Keith's Layers (Klayers)

🐍 A collection of Python Packages as AWS Lambda(λ) Layers 🐍

Python 3.8 Language grade: Python Code style: black

Layer List

List of all layer version arns are available by region here

There might be multiple versions for a single package, as we publish a new layer version if the package dependencies (requirements.txt) has been updated. Refer to Layer expiry for more data.

Note: We have deprecated layers for python3.6 and python 3.7, please use these newer versions that are built for python 3.8 going forward.

Python Packages

Just some examples of the ~70 packages we build every week, for a full list click here:

  • aws-lambda-powertools
  • aws-xray-sdk
  • bcrypt
  • beautifulsoup4
  • boto3
  • dynamodb-encryption-sdk
  • idna
  • lambda-cache
  • nltk
  • numpy
  • opencv-python-headless
  • openpyxl
  • pandas
  • parliament
  • Pillow
  • pulp
  • pycryptodome
  • PyJWT
  • PyMUPDF
  • pyqldb
  • pytesseract
  • pytz
  • PyYAML
  • requests
  • slackclient
  • spacy
  • ...

Status of layers

Click here to see specific dependencies of all the latest builds. Layers are built with the latest package version at 2am UTC every Sunday.

Using the Layers

You can use the layers anyway you see fit, here are 3 proposed options:

Option 1: Set ARN as layer

Click links below for your preferred version of python, and then select your region of choice, you will see a full list of layer version ARNs to use.

Once selected, you can add the arn directly from the console, by selecting Layers->Add a Layer->Specify an Arn:

Screenshot

Option 2: Download copy of layer

Use the Get Layer Version by ARN in python or aws-cli command which will provide an S3 location to download the layer as a zip.

Note: You can only get layers from the specific region your client is configured for, otherwise you'll get a AccessDeniedException error.

Option 3: Using Serverless Framework

You can include layers in your deployments, by utilizing the layers property at the function level, and setting it to the arn of your choice. You must use layers from the same region as your function:

check:
  handler: 02_pipeline/check.main
  description: Checks for package on PyPi via the API
  runtime: python3.8
  timeout: 30
  memorySize: 256
  layers:
  - arn:aws:lambda:${self:provider.region}:113088814899:layer:Klayers-python37-packaging:1
  - arn:aws:lambda:${self:provider.region}:113088814899:layer:Klayers-python38-aws-lambda-powertools:23

Layer expiry

Some layer versions will have a expiry_date field. This is the date for when the layers will be deleted.

In general, layers are scheduled for deletion 60 days after a new layer version has been published for that package. If you use that latest version of a layer, you're guaranteed at least 60 days before the layer is deleted.

All functions deployed with a layer will still work indefinitely, but you won't be able to deploy new functions referencing a deleted layer version.

Binaries

Special hand-crafted binaries for layers. These layers are not automatically built, and hence slower update cycles, and will only work with python3.7 functions as the underlying OS is Amazon Linux 1.

Package ARN Version
pip arn:aws:lambda:<region>:113088814899:layer:Klayers-python37-pip:2 19.2.1 1
en_core_web_sm arn:aws:lambda:<region>:770693421928:layer:Klayers-python38-spacy_model_en_small:1 2.2.5 2
es_core_news_sm arn:aws:lambda:<region>:770693421928:layer:Klayers-python38-spacy_model_es_small:1 2.3.1 2

1 Python3.8 layers already have new version of pip, use only if on Python3.7

2 Spacy en_core_web_sm model, for use with the spacy layer refer here for more info.

Architecture Diagram

Screenshot

API (beta)

We've recently added an API under beta. All API calls are http-based, and work only with https (TLS1.2 and above). The API is heavily cached, so there could be minor delays in updates.

Get latest ARN for specific package in region

Returns data on the latest layer for a specific {package} in a specific {region}

https://api.klayers.cloud/api/v1/layers/latest/{region}/{package}

example:

Get all ARNs for specific package in region

Returns data on the all layers (latest and deprecated) for a specific {package} in a specific {region}

https://api.klayers.cloud/api/v1/layers/{region}/{package}

example:

Get list of all built packages

Returns list of all packages currently being built, including dependencies and build date.

https://api.klayers.cloud/api/v1/builds/latest

example:

Special Thanks

Asking for additional layers

If you would like a new package to be made a layer, raise a pull request modifying the pipeline/config/Klayers-prodp38 file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].