Introducing the Lambda-Packs Project
Overview
Lambda-Packs is a collection of precompiled packages specifically designed for use with AWS Lambda. AWS Lambda is a serverless compute service that allows users to run code without having to manage servers, which enables developers to run applications or backend services without provisioning or managing infrastructure, automatically scaling up or down according to demand.
Getting Started
To begin using Lambda-Packs, one needs an AWS account. The process starts by visiting the AWS Lambda console to create or log into an account. Afterward, users can create a new Lambda function using a blank template and configure it with Python 2.7 as the runtime environment. Handlers and roles are set up with a new role based on simple microservice permissions, followed by configuring advanced settings like memory and timeout durations. The code type is set to an uploaded .ZIP file format, chosen from the available precompiled pack, Pack.zip
.
Modifying Packages
To tailor the Lambda function to specific needs, users can modify the service.py
file found within the sources folder. It is important to bundle all files from the sources folder into a .ZIP file without putting them in a single folder before uploading the updated file back into the Lambda function page.
Current Packages
Lambda-Packs offers a variety of precompiled packages that extend AWS Lambda's functionality, catering to different project needs:
Selenium PhantomJS
This package provides a ready tool for web scraping with Selenium on PhantomJS. It automates web tasks like opening pages, logging in, and completing forms. This demo opens a random Wikipedia page and outputs its header.
Pyresttest + WRK
Designed for load testing, this pack allows up to 2000 AWS Lambdas to run parallel tests across 11 AWS regions, providing powerful concurrency. The package includes Pyresttest for API pipeline testing alongside WRK for load handling.
Lxml + Requests
Aimed at parsing static HTML pages, this pack offers faster performance and lower memory consumption compared to PhantomJS but is more limited in scope.
TensorFlow
This package brings machine learning deployment simplicity using TensorFlow, ideal for running scalable and cost-effective image recognition tasks on Lambda.
Sklearn
This package caters to machine learning enthusiasts, simplifying the deployment of machine learning models.
Skimage
A component of image processing tools, this package includes a vast array of image-algorithms and techniques.
OpenCV + PIL
Essential for image processing and computer vision tasks, this package provides comprehensive image manipulation capabilities.
Pandas
This package is ideal for data enthusiasts, enabling powerful data manipulation and analysis directly within Lambda functions.
SpaCy
SpaCy offers resources for Natural Language Processing (NLP), providing simple tools for advanced text analysis.
Tesseract
A popular library for Optical Character Recognition (OCR), Tesseract allows for converting images into readable text.
Document and Image Generation
This pack generates a plethora of documents and images of various formats such as PDFs, DOCX, and PNGs, quickly and with minimal memory use.
Satellite Imagery Processing
Specialized for geospatial data, this package facilitates satellite image processing, enabling the generation of true-color images using Landsat 8 bands.
PyTorch
Featuring the PyTorch library, this package supports machine learning and deep learning tasks and is compatible with Python 3.6.
Conclusion
Lambda-Packs provides a diverse array of tools and libraries for ensuring AWS Lambda users can maximize their application's capabilities. By leveraging these precompiled packages, developers can swiftly integrate sophisticated functionality into their serverless applications, across a variety of domains from machine learning to image processing and web scraping.