Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 622 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 622 Bytes

Introduction

This project is a demonstration on how to use AWS SAM local to simulate a local AWS API Gateway pointing to a local lambda function (using Go as runtime) for local development.

Usage

  1. Compile the main.go into a binary
GOOS=linux go build -o main
  1. Install SAM Local

  2. Start the SAM Local server

sam local start-api
  1. Access the API (curl needs to be installed)
curl -X POST -d world http://localhost:3000/products/test

You should see Hello world% being returned.