All Projects → nogizhopaboroda → lapa

nogizhopaboroda / lapa

Licence: MIT License
Universal AWS Lambda packager

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lapa

Downloadthisvideo
Twitter bot for easily downloading videos/GIFs off tweets
Stars: ✭ 530 (+2550%)
Mutual labels:  aws-lambda, lambda-functions
Lambcycle
🐑🛵 A declarative lambda middleware with life cycle hooks 🐑🛵
Stars: ✭ 88 (+340%)
Mutual labels:  aws-lambda, lambda-functions
Awslambdaproxy
An AWS Lambda powered HTTP/SOCKS web proxy
Stars: ✭ 571 (+2755%)
Mutual labels:  aws-lambda, lambda-functions
All About Programming
Everything about programming!!
Stars: ✭ 314 (+1470%)
Mutual labels:  aws-lambda, lambda-functions
Serverless Aws Alias
Alias support for Serverless 1.x
Stars: ✭ 171 (+755%)
Mutual labels:  aws-lambda, lambda-functions
Serverless Photo Recognition
A collection of 3 lambda functions that are invoked by Amazon S3 or Amazon API Gateway to analyze uploaded images with Amazon Rekognition and save picture labels to ElasticSearch (written in Kotlin)
Stars: ✭ 345 (+1625%)
Mutual labels:  aws-lambda, lambda-functions
Aws Serverless Airline Booking
Airline Booking is a sample web application that provides Flight Search, Flight Payment, Flight Booking and Loyalty points including end-to-end testing, GraphQL and CI/CD. This web application was the theme of Build on Serverless Season 2 on AWS Twitch running from April 24th until end of August in 2019.
Stars: ✭ 1,290 (+6350%)
Mutual labels:  aws-lambda, lambda-functions
aws-appsync-session-manager
AWS AppSync Session Manager - a sample AppSync project
Stars: ✭ 18 (-10%)
Mutual labels:  aws-lambda, aws-lambda-node
Lambda Text Extractor
AWS Lambda functions to extract text from various binary formats.
Stars: ✭ 159 (+695%)
Mutual labels:  aws-lambda, lambda-functions
Aws Lambda List
A list of hopefully useful AWS lambdas and lambda-related resources.
Stars: ✭ 130 (+550%)
Mutual labels:  aws-lambda, lambda-functions
Serverless Plugin Canary Deployments
Canary deployments for your Serverless application
Stars: ✭ 283 (+1315%)
Mutual labels:  aws-lambda, lambda-functions
aws-sam-typescript-layers-example
Example project for developing AWS Lambda functions on TypeScript with all goodies: local development, tests, debugging, shared layers (3rd party and your own), and deploy.
Stars: ✭ 168 (+740%)
Mutual labels:  lambda-functions, aws-lambda-node
Amplify Cli
The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Stars: ✭ 2,399 (+11895%)
Mutual labels:  aws-lambda, lambda-functions
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 (+24245%)
Mutual labels:  aws-lambda, lambda-functions
lambda-watchtower
Serverless HTTP(S) Endpoint Monitoring With AWS Lambda & CloudWatch
Stars: ✭ 68 (+240%)
Mutual labels:  aws-lambda, aws-lambda-node
Epsagon Go
Automated tracing library for Go 1.x ⚡️
Stars: ✭ 24 (+20%)
Mutual labels:  aws-lambda, lambda-functions
Lambda Toolkit
*DO NOT USE* - This project was done during my initial python and lambda's studies. I would recommend you the `serverless framework`.
Stars: ✭ 114 (+470%)
Mutual labels:  aws-lambda, lambda-functions
Lumigo Cli
Open source CLI tool to help you develop and manage serverless applications.
Stars: ✭ 242 (+1110%)
Mutual labels:  aws-lambda, lambda-functions
aws-sync-routes
Synchronizes the specified route from the main/default route table to all custom route tables in the VPC.
Stars: ✭ 16 (-20%)
Mutual labels:  aws-lambda, aws-lambda-node
kmm-awesome
An awesome list that curates the best KMM libraries, tools and more.
Stars: ✭ 598 (+2890%)
Mutual labels:  tools

lapa

(Almost) universal AWS Lambda packager. It generates zip archive ready for uploading on AWS with no pain using just a simple config file.

Supports node and python out of the box, can be customised for other environments.

Usage

Installation

manual
curl https://raw.githubusercontent.com/nogizhopaboroda/lapa/master/packer.py -o /usr/local/bin/lapa && chmod +x /usr/local/bin/lapa
with npm
npm i -g https://github.com/nogizhopaboroda/lapa
as a local npm dependency
npm i --save-dev https://github.com/nogizhopaboroda/lapa

then in package.json:

{
  ...
  "scripts": {
    "pack": "lapa"
  }
  ...
}
Usage directly from github
python <(curl https://raw.githubusercontent.com/nogizhopaboroda/lapa/master/packer.py) [arguments]

Configuration

Config file

A config file is either plain json file (packer.config.json) or js module (packer.config.js) that exports configuration object placed within project directory.

example packer.config.json:

{
  "environment": "python",
  "files": ["*.py", "*.ini"],
  "ignore": ["lib/*", "bin/*"],
  "dependencies": ["requests"],
  "zipName": "./dist/my-lambda.zip"
}

example packer.config.js:

//packer.config.js

//js configs are treated as regular js modules,
//so you can use variables, require another modules and so on
const common = {
  "environment": "node",
  "files": "*",
  "ignore": ["node_modules/*"]
}

module.exports = [
  {
    ...common,
    "dependencyFile": "package.json",
    "zipName": "./dist/my-lambda.zip"
  },
  {
    ...common,
    "dependencyFile": "edge.package.json",
    "zipName": "./dist/my-edge-lambda.zip"
  },
]

Configuration object

{ //can be an array (for multiple builds)
  "environment": <String|Object>,

  //optional fields
  "files": <String|Array>,
  "ignore": <String|Array>,
  "dependencyFile": <String>,
  "dependencies": <String|Array>,
  "zipName": <String>,
  "mapDirectories": <Object>
}
Required fields

environment:

environment to use when install dependencies. So far only node and python are supperted.

Can also be an object of dependencies installation instructions. In such case:

{
  "environment": {
    "installDependencies": "some-bundler install {dependencies}",
    "installDependencyFile": [
      "some-bundler install {dependencyFile}"
    ],
  }
}

where

{dependencies} - space-separated dependencies from config object

{dependencyFile} - dependency file from config object

Optional fields

files (Default: [*]):

file/directory masks to include to archive

ignore (Default: []):

file/directory masks to ignore

dependencyFile:

file to use as a dependency file

dependencies (Default: []):

list of dependencies

zipName (Default: lambda.zip):

output archive name

mapDirectories:

Change file directory in resulting archive. Example:

{
  //  src/a.js -> a.js
  //  b.js     -> b.js
  "mapDirectories": {
    "src": "./"
  }
}

Generate a basic configuration file

You can create config file in interactive mode

lapa --init

App will ask you several questions and try to guess you environment based on most common files type

Run

within project directory simply run:

lapa

Examples

Troubleshooting

Pip can't install dependencies in specific directory

It's known issue if your pip is installed via brew. As a workaround just copy this setup.cfg file in your project on root level as in this example

Requirements

python >= 2

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].