All Projects → vapor-community → Vapor Aws Lambda Runtime

vapor-community / Vapor Aws Lambda Runtime

Licence: apache-2.0
Run your Vapor api server on AWS Lambda using the official Swift Server runtime.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Vapor Aws Lambda Runtime

Archive aws Lambda Go Shim
Author your AWS Lambda functions in Go, effectively.
Stars: ✭ 799 (+1129.23%)
Mutual labels:  aws, aws-lambda, lambda
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-21.54%)
Mutual labels:  aws, aws-lambda, lambda
Serverless Plugin Warmup
Keep your lambdas warm during winter. ♨
Stars: ✭ 814 (+1152.31%)
Mutual labels:  aws, aws-lambda, lambda
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 (+7390.77%)
Mutual labels:  aws, aws-lambda, lambda
Apex
Old apex/apex
Stars: ✭ 20 (-69.23%)
Mutual labels:  aws, aws-lambda, lambda
Archive aws Lambda Go
A fast and clean way to execute Go on AWS Lambda.
Stars: ✭ 710 (+992.31%)
Mutual labels:  aws, aws-lambda, lambda
Lambdalogs
A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.
Stars: ✭ 18 (-72.31%)
Mutual labels:  aws, aws-lambda, lambda
Grant
OAuth Proxy
Stars: ✭ 3,509 (+5298.46%)
Mutual labels:  aws, aws-lambda, 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 (+12883.08%)
Mutual labels:  aws, aws-lambda, lambda
Lambda Deployment Example
Automated Lambda Deployments with Terraform & CodePipeline
Stars: ✭ 25 (-61.54%)
Mutual labels:  aws, aws-lambda, lambda
Mangum
AWS Lambda & API Gateway support for ASGI
Stars: ✭ 475 (+630.77%)
Mutual labels:  aws, aws-lambda, lambda
Serverless Plugin Stackstorm
Plugin for serverless framework to run ready to use actions from StackStorm Exchange as AWS Lambda.
Stars: ✭ 28 (-56.92%)
Mutual labels:  aws, aws-lambda, lambda
Lambdaphp
Quick and Dirty PHP website hosting using Aws Lambda
Stars: ✭ 449 (+590.77%)
Mutual labels:  aws, aws-lambda, lambda
Lambda Packages
Various popular python libraries, pre-compiled to be compatible with AWS Lambda
Stars: ✭ 713 (+996.92%)
Mutual labels:  aws, aws-lambda, lambda
Serverless Rust
⚡ 🦀 a serverless framework plugin for rustlang applications
Stars: ✭ 386 (+493.85%)
Mutual labels:  aws, aws-lambda, lambda
Aws Lambda Resize Images
AWS Lambda function to generate a set of resized images (large, medium, small)
Stars: ✭ 6 (-90.77%)
Mutual labels:  aws, aws-lambda, lambda
Lambdaguard
AWS Serverless Security
Stars: ✭ 300 (+361.54%)
Mutual labels:  aws, aws-lambda, lambda
Aws Lambda Cpp
C++ implementation of the AWS Lambda runtime
Stars: ✭ 300 (+361.54%)
Mutual labels:  aws, aws-lambda, lambda
Aws Lambda Workshop
Some incremental examples suitable to host an AWS Lambda Functions workshop
Stars: ✭ 18 (-72.31%)
Mutual labels:  aws, aws-lambda, lambda
Lamb
monitoring tool for better visibility when developing AWS Lambda functions
Stars: ✭ 11 (-83.08%)
Mutual labels:  aws, aws-lambda, lambda

vapor-aws-lambda-runtime

Swift 5.2 Vapor 4 github-actions codecov

Run your Vapor app on AWS Lambda. This package bridges the communication between swift-aws-lambda-runtime and the Vapor framework. APIGateway requests are transformed into Vapor.Requests and Vapor.Responses are written back to the APIGateway. It intents to bring the funcionality of aws-lambda-go-api-proxy to Vapor.

Status

Note: Currently this is nothing more than a proof of concept. Use at your own risk. I would like to hear feedback, if you played with this. Please open a GitHub issues for all open ends, you experience.

What I have tested:

  • [x] Routing
  • [x] JSON Coding
  • [ ] Cors Middleware
  • [ ] Fluent

There are probably tons of other things that we should test. I haven't done much with Vapor so far. Therefore you will need to help me list the things to test.

Examples:

If you test anything, please open a PR so that we can document the state of affairs better. A super small example would be even better. I plan to create some integration tests with the examples.

Usage

Add vapor-aws-lambda-runtime and vapor as dependencies to your project. For this open your Package.swift:

  dependencies: [
    .package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "4.0.0")),
    .package(url: "https://github.com/fabianfett/vapor-aws-lambda-runtime", .upToNextMajor(from: "0.4.0")),
  ]

Add VaporLambdaRuntime as depency to your target:

  targets: [
    .target(name: "Hello", dependencies: [
      .product(name: "Vapor", package: "vapor"),
      .product(name: "VaporAWSLambdaRuntime", package: "vapor-aws-lambda-runtime")
    ]),
  ]

Create a simple Vapor app.

import Vapor
import VaporAWSLambdaRuntime

let app = Application()

struct Name: Codable {
  let name: String
}

struct Hello: Content {
  let hello: String
}

app.get("hello") { (_) -> Hello in
  Hello(hello: "world")
}

app.post("hello") { req -> Hello in
  let name = try req.content.decode(Name.self)
  return Hello(hello: name.name)
}

Next we just need to run the vapor app. To enable running in Lambda, we need to change the "serve" command. Then we can start the app by calling app.run()

app.servers.use(.lambda)

try app.run()

Contributing

Please feel welcome and encouraged to contribute to vapor-aws-lambda-runtime. The current version has a long way to go before being ready for production use and help is always welcome.

If you've found a bug, have a suggestion or need help getting started, please open an Issue or a PR. If you use this package, I'd be grateful for sharing your experience.

If you like this project, I'm excited about GitHub stars. 🤓

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