I use codebuild to create a go binary using go 1.14.7 on linux:
GOOS=linux GOARCH=amd64 go build -trimpath -ldflags=-buildid="" -o myBin main.go