Skip to content

Instantly share code, notes, and snippets.

@SamanShafigh
Created June 14, 2018 02:07
Show Gist options
  • Save SamanShafigh/820ed36dc42fd9cb8d2852debc586fb9 to your computer and use it in GitHub Desktop.
Save SamanShafigh/820ed36dc42fd9cb8d2852debc586fb9 to your computer and use it in GitHub Desktop.
Sample hello world Lambda GO
package main
import "github.com/aws/aws-lambda-go/lambda"
type Event struct {
Payload string `json:"payload"`
}
func HandleRequest(e Event) (Event, error) {
return Event{"Hello World"}, nil
}
func main() {
lambda.Start(HandleRequest)
}
'use strict';
module.exports.hello = (event, context, callback) => {
const response = {
payload: "Hello World",
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment