Skip to content

Instantly share code, notes, and snippets.

@ctompkinson
Last active March 26, 2018 09:24
Show Gist options
  • Save ctompkinson/3f622f6fc408b4d947039f1f8c90a75b to your computer and use it in GitHub Desktop.
Save ctompkinson/3f622f6fc408b4d947039f1f8c90a75b to your computer and use it in GitHub Desktop.

Revisions

  1. ctompkinson renamed this gist Mar 26, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. ctompkinson created this gist Mar 26, 2018.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    # Running and testing go lambdas locally


    To run the lambda locally

    ```
    _LAMBDA_SERVER_PORT=8001 go run wavefront_handler.go
    ```

    To invoke the lambda

    ```
    package main

    import (
    "github.com/djhworld/go-lambda-invoke/golambdainvoke"
    )

    func main() {
    response, err := golambdainvoke.Run(8001, "payload")
    if err != nil {
    fmt.Println(err)
    }
    fmt.Println(response)
    }
    ```