Skip to content

Instantly share code, notes, and snippets.

@SamanShafigh
Created Jun 14, 2018
Embed
What would you like to do?
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