sepehr / Serverless Offline Golang
Golang development with serverless.js deployments and offline Lambda + API Gateway emulation using SAM Local.
Stars: ✭ 19
Labels
Projects that are alternatives of or similar to Serverless Offline Golang
Swim
Distributed software platform for building stateful, massively real-time streaming applications.
Stars: ✭ 368 (+1836.84%)
Mutual labels: serverless-framework
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 (+25526.32%)
Mutual labels: serverless-framework
Aws Boilerplate
Opinionated full stack web app's boilerplate, ready to be deployed to AWS platform.
Stars: ✭ 682 (+3489.47%)
Mutual labels: serverless-framework
Skygear Server
Skygear - an open source serverless platform for modern secure app development
Stars: ✭ 380 (+1900%)
Mutual labels: serverless-framework
Guide
Serverless Guide - An open-source definitive guide to serverless architectures.
Stars: ✭ 421 (+2115.79%)
Mutual labels: serverless-framework
Serverless Devs
🔥🔥🔥 Serverless Devs developer tool ( Serverless Devs 开发者工具 )
Stars: ✭ 545 (+2768.42%)
Mutual labels: serverless-framework
Serverless Stack Com
An open source guide for building and deploying full-stack apps using Serverless and React on AWS.
Stars: ✭ 3,617 (+18936.84%)
Mutual labels: serverless-framework
Serverless Appsync Plugin
serverless plugin for appsync
Stars: ✭ 804 (+4131.58%)
Mutual labels: serverless-framework
Aws Iot Chat Example
💬 Chat application using AWS IoT platform via MQTT over the WebSocket protocol
Stars: ✭ 474 (+2394.74%)
Mutual labels: serverless-framework
Serverless Plugin Typescript
Serverless plugin for zero-config Typescript support
Stars: ✭ 611 (+3115.79%)
Mutual labels: serverless-framework
Serverless Express
Run Node.js web applications and APIs using existing application frameworks on AWS #serverless technologies such as Lambda, API Gateway, Lambda@Edge, and ALB.
Stars: ✭ 4,265 (+22347.37%)
Mutual labels: serverless-framework
Serverless Plugin Aws Alerts
A Serverless Framework plugin that creates CloudWatch alarms for functions.
Stars: ✭ 419 (+2105.26%)
Mutual labels: serverless-framework
Puppeteer Lambda Starter Kit
Starter Kit for running Headless-Chrome by Puppeteer on AWS Lambda.
Stars: ✭ 563 (+2863.16%)
Mutual labels: serverless-framework
Serverless Wsgi
Serverless plugin to deploy WSGI applications (Flask/Django/Pyramid etc.) and bundle Python packages
Stars: ✭ 377 (+1884.21%)
Mutual labels: serverless-framework
Serverless Nodejs Starter
A Node.js starter for Serverless Framework with ES6 and TypeScript support
Stars: ✭ 683 (+3494.74%)
Mutual labels: serverless-framework
Midway Faas
🔱 A simple and lightweight serverless framework
Stars: ✭ 363 (+1810.53%)
Mutual labels: serverless-framework
Serverless Stack Demo Api
Source for the demo app API in Serverless-Stack.com
Stars: ✭ 486 (+2457.89%)
Mutual labels: serverless-framework
Serverless Aws Lambda Node Postgres
Serverless AWS Lambda with Node.js,Postgres Rest API with Sequelize.
Stars: ✭ 18 (-5.26%)
Mutual labels: serverless-framework
Serverless Step Functions
AWS Step Functions plugin for Serverless Framework ⚡️
Stars: ✭ 758 (+3889.47%)
Mutual labels: serverless-framework
Serverless Authentication Boilerplate
Generic authentication boilerplate for Serverless framework
Stars: ✭ 563 (+2863.16%)
Mutual labels: serverless-framework
Serverless Offline Golang Development Setup
A preliminary setup & skeleton to kickstart with local AWS Lambda development in Go.
It's a mixture of Serverless and SAM Local. Using the former as deployment framework due to its wider range of features, bigger community and its language/provider agnostic nature. And the latter only for offline Lambda + API Gateway simulation using a docker container.
Requirements
- Working Golang environment, preferably with
dep
- Working Node environment to install dependencies
- Working Docker machine to invoke lambdas locally
Installation & usage
# Install npm dependencies
npm install -g serverless aws-sam-local
# Clone the skeleton
git clone https://github.com/sepehr/serverless-offline-go.git golambda
# Compile the sample lambdas
cd golambda/
make
# Invoke the "apigw" sample lambda locally at localhost:3000
sam local start-api
# Invoke the "Vanilla" sample lambda locally using a custom event payload file
sam local invoke "Vanilla" -e path/to/event.json
# Or using an event payload from the stdin
echo '{"message": "Hey, are you there?" }' | sam local invoke "Vanilla"
# Deploy to AWS
# Requires authenticated aws-cli setup in place
sls deploy -s dev
Making changes
- Renaming lambdas requires you to update the names in
Makefile
,serverless.yml
andtemplate.yml
. - Updating APIGW endpoints requires you to update both
serverless.yml
andtemplate.yml
(if you want it offline).
Additional Notes
- Included
serverless.yml
definition is originated from the officialaws-go-dep
template provided by the serverless framework with just a minimal update to add a APIGW endpoint. - One of the template sample lambdas has been replaced by a more useful one that can work with APIGW.
- Sample lambdas have been organized into
cmd/
directory as per common practice.
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].