GoLang Packaging for AWS Lambda

Hello,

I have a directory structure like below:

main.go
mylib/
mylib.go

How do i zip the folders for deployment to AWS lambda?

I have done build of the main.go file. Is this the only file which will go in the Zip file or the library file needs to be zipped as well?

In short, you must build your code, zip and deploy the executable file only.
Please, use this github repo https://github.com/aws/aws-lambda-go and read the official AWS guide https://docs.aws.amazon.com/lambda/latest/dg/lambda-go-how-to-create-deployment-package.html

1 Like

Thanks!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.