All Projects → bustle → Shep

bustle / Shep

Licence: mit
A framework for building JavaScript Applications with AWS API Gateway and Lambda

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Shep

Aws Lambda Fastify
Insipired by aws-serverless-express to work with Fastify with inject functionality.
Stars: ✭ 190 (-49.47%)
Mutual labels:  api-gateway, aws, serverless, lambda, amazon
Mangum
AWS Lambda & API Gateway support for ASGI
Stars: ✭ 475 (+26.33%)
Mutual labels:  api-gateway, aws, serverless, lambda
Aws Serverless Ecommerce Platform
Serverless Ecommerce Platform is a sample implementation of a serverless backend for an e-commerce website. This sample is not meant to be used as an e-commerce platform as-is, but as an inspiration on how to build event-driven serverless microservices on AWS.
Stars: ✭ 469 (+24.73%)
Mutual labels:  api-gateway, aws, serverless, lambda
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+497.61%)
Mutual labels:  api-gateway, aws, serverless, lambda
Aws Toolkit Vscode
AWS Toolkit for Visual Studio Code, an extension for working with AWS services including AWS Lambda.
Stars: ✭ 823 (+118.88%)
Mutual labels:  aws, serverless, lambda, amazon
Aws Sam Cli
CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
Stars: ✭ 5,817 (+1447.07%)
Mutual labels:  api-gateway, aws, serverless, lambda
Aws Mobile React Sample
A React Starter App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.
Stars: ✭ 650 (+72.87%)
Mutual labels:  api-gateway, aws, serverless, lambda
Up
Up focuses on deploying "vanilla" HTTP servers so there's nothing new to learn, just develop with your favorite existing frameworks such as Express, Koa, Django, Golang net/http or others.
Stars: ✭ 8,439 (+2144.41%)
Mutual labels:  api-gateway, aws, serverless, lambda
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-86.44%)
Mutual labels:  api-gateway, aws, serverless, lambda
Terraform Nextjs Plugin
A plugin to generate terraform configuration for Nextjs 8 and 9
Stars: ✭ 41 (-89.1%)
Mutual labels:  api-gateway, aws, serverless, lambda
Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-92.82%)
Mutual labels:  api-gateway, aws, serverless, lambda
Hexaville
The modern serverless web application engine and framework for Swift
Stars: ✭ 123 (-67.29%)
Mutual labels:  api-gateway, aws, serverless, lambda
Serverless Next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
Stars: ✭ 2,977 (+691.76%)
Mutual labels:  api-gateway, aws, serverless, lambda
Zappa
Serverless Python
Stars: ✭ 224 (-40.43%)
Mutual labels:  api-gateway, serverless, 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 (-27.93%)
Mutual labels:  aws, serverless, lambda
Aws Serverless Workshops
Code and walkthrough labs to set up serverless applications for Wild Rydes workshops
Stars: ✭ 3,512 (+834.04%)
Mutual labels:  aws, serverless, lambda
Grant
OAuth Proxy
Stars: ✭ 3,509 (+833.24%)
Mutual labels:  aws, serverless, lambda
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (-42.55%)
Mutual labels:  api-gateway, aws, lambda
Arc.codes
The Architect web site! 🌩
Stars: ✭ 271 (-27.93%)
Mutual labels:  api-gateway, aws, lambda
Terraform Aws Github Runner
Terraform module for scalable GitHub action runners on AWS
Stars: ✭ 326 (-13.3%)
Mutual labels:  aws, serverless, lambda

Build Status Code Climate

A framework for building JavaScript Applications with AWS API Gateway and Lambda

Make "Serverless" Simple

Amazon Web Services API gateway and Lambda are great tools for building and deploying "serverless" applications. But using them to deploy more than a couple functions/endpoints involves an excessive amount of manual work such as zipping files, uploading via the web UI, configuring paths and function names, etc. Shep is built to automate as many of these tasks as possible, giving you the ability to deploy an entire API and suite of lambda functions with one CLI command.

Getting Started With Shep

Prerequisites

It will be helpful to have some existing experience with API gateway and Lambda. If you have never used either of these tools before, it is recommended to setup a function manually to see how things are done. Please refer to Amazon's own getting started guide

AWS credentials

Shep will require your amazon credentials and will load them using the same methods as the AWS CLI tool meaning you must have setup the AWS CLI tool before using shep. Consult Amazon's CLI documentation for instructions.

AWS S3 Build Artifacts

Shep stores build artifacts on S3 so it can skip the upload step when your functions don't change. By default, Lambda won't update the version of an alias unless the function has changed - so this will come into effect for deploys of config changes. This isn't enabled by default, to enable it add the name of the S3 bucket to the "bucket" field in the shep version of your package.json.

Installation

npm install -g shep

// Optionally install shep in your project. The global shep will run the project's shep
npm install --save-dev shep

Add a few lines to your package.json. Your account id can be found on the billing page of your aws account.

{
  "name": "my-great-package",
    "shep": {
      "accountId": "XXXXX",
      "region": "us-east-1",
      "bucket": "my-great-bucket", // optional upload builds to s3 instead of directly to lambda
      "dist": "dist" // optional, customize the dist folder location
    }
}

Environments

Environments for a shep project are defined by the aliases on the functions associated with a project. Environments are created through shep deploy --env new_env and managed by using the shep config commands. Shep takes a strong stance against having different environments for different functions within a project. If you attempt a command which requires the listing of environments and there is a mismatch detected, then shep will throw a EnvironmentMistmach error until you remedy the issue. Most issues can be automatically fixed by using shep config sync, the only issues this can't solve are conflicting environment variable values. Conflicting value issues can be solved by using shep config set my_env CONFLICT_VARIABLE=value.

Custom Builds Commands

By default shep builds all your functions using webpack. If your project requires a different build process, then edit your package.json. Before running your build command, shep populates the PATTERN environment variable which can be accessed as process.env.PATTERN in your build command. Be aware that using your own build process will break pattern matching for shep build unless your build command respects the PATTERN variable.

{
  "shep": {
    "buildCommand": "custom-build --with-flag"
  }
}

Creating a new API

1. Configure AWS

Since Shep uses the same credentials as the AWS CLI, all you need to do is configure the cli. This can be accomplished via aws configure.

2. Create a new Shep project

Run shep new my-project
This will create and configure a Shep project called 'my-project' in the my-project directory. Change into this directory.

3. Create a new endpoint and function

Run shep generate endpoint /hello and follow the prompts.
This creates a new endpoint as well as a new function for that endpoint. Specifically, it adds a path to api.json that is configured to trigger the newly created function.

4. Deploy

Run shep deploy --env development
This command does a couple things in order to deploy your project:

  • Uses webpack to build your functions. This is equivalent to running shep build.
  • Creates or updates the Lambda functions associated with your project. This includes creating a new version of the function as well as updating the alias such that development will point to the version you just created. For more on versioning please consult Amazon's own documentation.
  • Creates or updates the API Gateway associated with your project and deploys it to the specified stage, development in this case.

You can test your endpoint by visiting the API URL printed out after the project is deployed. Visiting the /hello endpoint which should show success!.

CLI Documentation

CLI documentation can be found in DOCS.md

Upgrading

Read the migration docs for information on upgrading major version changes

Why the name 'shep'?

It was called 'shepherd' at first because it was helpful for dealing with lambda but everyone kept shortening it to 'shep' so we changed the name

Other Tools

Serverless Apex Gordon DEEP Claudia.js

Development

Pull requests welcome!

Test: npm test

Rebuild on file change: npm run compile -- -w

Publish: npm run pub "publish" is reserved by npm

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