Git Product home page Git Product logo

guitars's Introduction

Go Lambda workflow for AWS

This is a basic template repo for deploying an AWS Lambda function in Go. It uses AWS Lambda, S3, and Cloudformation for automating storage and deployment of Go lambda functions.

You can either fork or use as template through Github.

Requirements

  • Go Lang
  • AWS CLI
  • AWS SAM CLI
  • Proper aws configure settings that will allow you to connect to AWS Lambda, S3, IAM, and CloudFormation

Getting started

First, make sure you have all the required CLI tools installed!

Begin by installing all go dependencies, run: make install

Once all dependencies are installed, you can start the API by running: make api. Visit http://127.0.0.1:3000/ in your browser to see your Lambda execution!

Finally, update main.go to fit your needs!

Included commands

Most of the commands have been extracted into a make file. To run any of the the following commands type make COMMAND_GOES_HERE

List of commands:

  • test - runs tests using go test
  • install - installs all go dependencies
  • main - builds the app for environment
  • lambda - builds app for environment AWS uses in the cloud
  • api - starts local API using Docker environment provided by SAM CLI (runs build)
  • package - uses sam-cli to create packaged.yaml file for CloudFormation. (Runs test and build before)
  • deploy - uses sam-cli to deploy the app on AWS (Runs test and package)
  • clean - cleans up app by removing old packaged.yaml file.

Deploying

In order to run the make deploy command successfully, you will need to supply the S3_BUCKET and STACK_NAME variables. Example usage below:

S3_BUCKET=YOUR_BUCKET_NAME STACK_NAME=YOUR_STACK_NAME make deploy

guitars's People

Contributors

wbits avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.