I use several Go Lambda functions that I compile as part of the install script and place the binaries in the functions folder. This worked for us for quite some time building the binaries with this command: go build -o functions/$bname -v $f/…; where $f is folder that stores Go code and $bname is name of file being compiled
We decided to optimize the binary by changing build command to: GOOS=linux GOARCH=amd64 go build -ldflags ‘-s -w’ -o functions/$bname -v $f/…;
The first part makes sure the binary is compiled for right environment for Lambda, and the ldflags make the binary smaller. This compiles fine in Netlify, and even indicates that all the functions have been uploaded however when I go to the functions tab and select the relevant branch, there are no Lambda Functions.
Is there a reason specifying the architecture and including the ldflags has made my Go binaries unusable for Netlify Functions?