1

I am trying to generate an exe file with this command in windows 10

go.exe get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip

the file comes back as linux_amd64/build-lambda-zip instead of build-lambda-zip.exe

Has anyone experienced this and know what the fix is? I am using the AWS docs here https://docs.aws.amazon.com/lambda/latest/dg/golang-package.html

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Eric chen
  • 31
  • 6
  • 1
    Does this answer your question? [How to cross compile from Windows to Linux?](https://stackoverflow.com/questions/20829155/how-to-cross-compile-from-windows-to-linux) – qorka Jun 10 '20 at 19:57

2 Answers2

3

If you want to create bin, use install command with override $GOOS var (Compile and install packages and dependencies ):

GOOS=windows go install  github.com/aws/aws-lambda-go/cmd/build-lambda-zip

exe file will be store to $GOBIN.

kozmo
  • 4,024
  • 3
  • 30
  • 48
1

there was another way to access the aws lambda tools

I found it in

%USERPROFILE%\dotnet\tools.store\amazon.lambda.tools\4.0.0\amazon.lambda.tools\4.0.0\tools\netcoreapp2.1\any\Resources\build-lambda-zip.exe

if its not there we can get it from aws directly but running this command

dotnet tool update -g Amazon.Lambda.Tools

Eric chen
  • 31
  • 6