Error: Javascript runtime used for Go lambda-function

I compiled and zipped a Go lambda function at in my functions/ directory but Netlify is deploying it with a Javascript runtime.

3:06:16 PM: Prepping functions with zip-it-and-ship-it 0.3.1
3:06:16 PM: [ { path: ‘/tmp/zisi-5eadc47ded85550007141c90/hello-world.zip’,
3:06:16 PM: runtime: ‘js’ } ]

I don’t have any env vars set, so I’m wondering why it is defaulting to a JS runtime for my functions? I do have Vue.js code in the same repo, but I don’t have any Javascript functions.

Hi @AngeloCicero, it’s because you deployed your function as a zip file. If you leave your hello-world binary unzipped, our system should recognize that it’s a go binary and will using the appropriate runtime. Let me know if that helps.

Thanks, I was trying to provide the function already packaged for AWS but I’m not sure if this is possible for Go functions.

For Go functions, you’ll want to build it with the go build command to compile it into a single binary. Is that what you are doing?

I was just trying to pack it up for the Lambda as suggested by these docs. I was using Go modules, so I don’t think the Netlify docs on this were pertaining to my situation.

Anyways, it looks like I don’t have to worry about any of this since Netlify will handle a single binary for me :slight_smile: Thanks!