Skip to content

Instantly share code, notes, and snippets.

@dabio
Created January 30, 2019 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabio/b282a1e99354d9ca55af639362e82318 to your computer and use it in GitHub Desktop.
Save dabio/b282a1e99354d9ca55af639362e82318 to your computer and use it in GitHub Desktop.
Getting started with Go and AWS Lambda

modules

  • go mod init
  • go get github.com/dabio/…
  • go mod vendor
  • go get -u github.com/dabio/…

std tools

  • go fmt ./...
  • go doc https://godoc.org/github.com/pinub/mux
  • go run main.go
  • go build ./...
  • file …
  • env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server ./...
  • Dockerfile
    FROM scratch
    COPY server /
    ENTRYPOINT ["/server"]
    EXPOSE 8080
    

aws tools

project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment