serverless-components / backend

Licence: other
Easily host entire web applications on a single AWS Lambda function using Serverless Components

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to backend

symfony-messenger
Bridge to use Symfony Messenger on AWS Lambda with Bref
Stars: ✭ 48 (+200%)
Mutual labels:  aws-lambda
ruby-vips-lambda
AWS Lambda Layer for Ruby Libvips Gem
Stars: ✭ 34 (+112.5%)
Mutual labels:  aws-lambda
minecraft-lambda-function
AWS Lambda function for managing Minecraft server
Stars: ✭ 37 (+131.25%)
Mutual labels:  aws-lambda
aws-lambda-nodejs-webpack
λ CDK Construct to build Node.js AWS lambdas using webpack
Stars: ✭ 32 (+100%)
Mutual labels:  aws-lambda
trackit
Trackit helps you understand and improve your use of AWS
Stars: ✭ 91 (+468.75%)
Mutual labels:  aws-lambda
lando
📦 🚀 a smooth-talking smuggler of Rust HTTP functions into AWS lambda
Stars: ✭ 68 (+325%)
Mutual labels:  aws-lambda
terraform-aws-ec2-ami-backup
Terraform module for automatic & scheduled AMI creation
Stars: ✭ 19 (+18.75%)
Mutual labels:  aws-lambda
aws-appsync-session-manager
AWS AppSync Session Manager - a sample AppSync project
Stars: ✭ 18 (+12.5%)
Mutual labels:  aws-lambda
lambda-cron
LambdaCron - serverless cron tool
Stars: ✭ 22 (+37.5%)
Mutual labels:  aws-lambda
splunk handler
Python logging handler for sending logs to Splunk Enterprise
Stars: ✭ 44 (+175%)
Mutual labels:  aws-lambda
airtable-backups-boilerplate
Configurable automated backups for Airtable meant to be self-hosted, powered by AWS Lambda/S3 with the Serverless framework
Stars: ✭ 29 (+81.25%)
Mutual labels:  aws-lambda
aws-lambda-firewall
Securely and conveniently support IP address whitelists for your publicly routable services.
Stars: ✭ 16 (+0%)
Mutual labels:  aws-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 (+12.5%)
Mutual labels:  aws-lambda
serverless-data-pipeline-sam
Serverless Data Pipeline powered by Kinesis Firehose, API Gateway, Lambda, S3, and Athena
Stars: ✭ 78 (+387.5%)
Mutual labels:  aws-lambda
twitter-bot-python-aws-lambda
A simple twitter bot using Python and an AWS Lambda function
Stars: ✭ 23 (+43.75%)
Mutual labels:  aws-lambda
amazon-eventbridge-cdk-audit-service-sample
Sample of a decoupled audit service using Amazon EventBridge and AWS Step Functions. Provisioned with AWS CDK.
Stars: ✭ 25 (+56.25%)
Mutual labels:  aws-lambda
serverless-company
Serverless. FaaS. Spring Boot. Spring Cloud Function
Stars: ✭ 15 (-6.25%)
Mutual labels:  aws-lambda
redis-examples
Sample applications implemented with serverless Redis
Stars: ✭ 44 (+175%)
Mutual labels:  aws-lambda
aws-lambda-docker-serverless-inference
Serve scikit-learn, XGBoost, TensorFlow, and PyTorch models with AWS Lambda container images support.
Stars: ✭ 56 (+250%)
Mutual labels:  aws-lambda
polyfill-lambda
Generates polyfills based on user agent strings
Stars: ✭ 83 (+418.75%)
Mutual labels:  aws-lambda

Backend

 

Easily host entire web applications on a single AWS Lambda function using this Serverless Component.

Features

  • Designed to make it easy to host pre-existing web frameworks (e.g. Express.js, Hapi) or any large web application on a single AWS Lambda Function.
  • Blazing Fast Uploads via AWS S3 Accelerated Transfer and Multi-Part.
  • Dependencies are automatically put in AWS Lambda Layers, reducing cold-start time and further reducing upload time.
  • Simple shim for receiving and responding to HTTP requests.
  • Supports specifying custom domains.

 

  1. Install
  2. Create
  3. Configure
  4. Deploy

 

1. Install

$ npm install -g serverless

2. Create

$ mkdir backend && cd backend

The directory should look something like this:

|- serverless.yml # required
|- index.js       # required
|- package.json   # optional
|- .env           # your AWS api keys
# .env
AWS_ACCESS_KEY_ID=XXX
AWS_SECRET_ACCESS_KEY=XXX

You must include an index.js file that looks like this:

module.exports = async (e, ctx, cb) => {
  return { statusCode: 200, body: 'backend app deployed.' }
}

// you could also just return an object
// which would return it as body with
// 200 status code by default
// module.exports = () => ({ hello: 'world' })

// or just a string
// module.exports = () => 'success'

// or a status code number
// module.exports = () => 404 // not found!

// you don't even need to export a function!
// module.exports = { hello: 'world' } // great for mocking!
// module.exports = 'success'
// module.exports = 500

3. Configure

All the following inputs are optional. However, they allow you to configure your Lambda compute instance and pass environment variables.

# serverless.yml

backend:
  component: '@serverless/backend'
  inputs:
    code:
      root: ./code # The root folder containing the backend code.
      src: dist # The folder within your 'src' directory containing your built artifacts
      hook: npm run build # A hook to build/test/do anything
    region: us-east-1
    runtime: nodejs10.x # The runtime for the lambda. Only nodejs10.x or nodejs8.10 are allowed
    memory: 128
    timeout: 10
    description: A function for the registry backend.    
    bucketName: myBucket # (Optional) The Bucket name where `src` files/folder will be upload.
                         # If not provided, it will create random bucket name prefixed by `backend-`
    env:
      TABLE_NAME: my-table

    # You can specify a custom domain name for your backend.
    # You must have a public hosted zone available for this domain in AWS Route53.
    # This is done automatically for you if you've purchased the domain via AWS Route53.
    domain: api.example.com

4. Deploy

$ serverless

All requests to this root url will be proxied directly to your lambda function, giving you full control of the http layer.

 

New to Components?

Checkout the Serverless Components repo for more information.

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