Coder Social home page Coder Social logo

lambda_layer_builder's Introduction

Create new Lambda Layer

Create S3 bucket for storing lambda layers

By default Lambda deployment package size is limited to 50MB. To overcome this limitation we will store lambda layer packages on S3 bucket.

Use an existing bucket or create a new one using the command below:

aws s3 mb s3://shuraosipov-lambda-layers

Update requirements.txt

Specify a list of packages you want to include to a layer in requirements.txt file.

Default content is:

amazon-textract-prettyprinter==0.0.10
amazon-textract-response-parser==0.1.20
pandas

Configure layer parameters

Provide python version, layer name, layer description and target S3 backet for storing layers in the confg file.

Default content is:

PYTHON_VERSION="python3.9"
LAYER_NAME="pandas-textract-reader"
LAYER_DESCRIPTION="Layer containing pandas, amazon-textract-response-parser and amazon-textract-prettyprinter libraries"
BUCKET_NAME="shuraosipov-lambda-layers"

Create a layer

From the app root folder:

$ cd build_scripts/
$ bash create_new_layer.sh config

You will see the following output:

Checking if necessary system packages is installed... Success!
Python version - python3.9
Package name - pandas-textract-reader-lambda-layer.zip
Building lambda layer in /tmp/tmp.nqoEObnXYl/python/lib/python3.9/site-packages/ folder
S3 bucket for storing lambda layer package - shuraosipov-lambda-layers
Installing dependencies...  Success!
Compiling the .zip file... Success!
Archive size is 45M
Uploading lambda layer package to S3... Success!
Publishing a layer...  Success!
Cleaning up... Success!
Enjoy your newly created layer - arn:aws:lambda:us-east-1:419091122511:layer:pandas-textract-reader:3

lambda_layer_builder's People

Contributors

shuraosipov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.