Skip to content

go-micah/hello-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-lambda

A simple hello world function, written in Go and running on Lambda

References

Relevant commands

go mod init github.com/go-micah/hello-lambda
go mod tidy
GOOS=linux GOARCH=amd64 go build -o .bin/hello main.go
(cd bin && zip -FS hello.zip hello)

Notes

You can tell the Lambda runtime which handler method to invoke by setting the handler parameter on your function's configuration.

When you configure a function in Go, the value of the handler setting is the executable file name. For example, using Handler would call the function in the package main of the Handler executable file.

In my case, I used hello as the executable, so I had to set this as the handler in the Lambda config.

Invoking from the AWS CLI

aws lambda invoke --function-name helloLambda --region us-east-1 /dev/stdout

About

A simple hello world function, written in Go and running on Lambda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published