Skip to content

frankbo/aws-lambda-go-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS lambda go example

Based on: aws golang handler docs
and: aws golang lambda docs

Go

Add github.com/aws/aws-lambda-go/lambda as a dependency
Build the package with: GOOS=linux go build main.go so that it compiles for linux.
The main.go file needs to have 644 permissions.
Zip the binary with: zip function.zip main

AWS

Go to the aws lambda function overview page on aws and create a new function
create a hello world project
upload the .zip file
configure the runtime to run with go1.x and as Handler use main
go to the test tab and use the hello-world trigger and use main as the event name\

AWS Lambda with AWS Api Gateway

When the lambda should be used with Api Gateway The Events need to be of type events.APIGatewayProxyResponse of the github.com/aws/aws-lambda-go/events library. Find the documentation here.
This Example project does not cover APIGateway

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages