lifadev / archive_aws-lambda-go-shim

Author your AWS Lambda functions in Go, effectively.

Home Page:https://github.com/eawsy/aws-lambda-go-shim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example doesn't work

nicolai86 opened this issue · comments

Thank you for this very promising approach to run go on lambda!

When I try to submit a lambda function as described in the example I get the following error:

START RequestId: 517245b7-e880-11e6-9666-116d097ce2b1 Version: $LATEST
Unable to import module 'handler': plugin.Open: plugin was built with a different version of package github.com/eawsy/aws-lambda-go-core/service/lambda/runtime

END RequestId: 517245b7-e880-11e6-9666-116d097ce2b1
REPORT RequestId: 517245b7-e880-11e6-9666-116d097ce2b1	Duration: 0.24 ms	Billed Duration: 100 ms 	Memory Size: 128 MB	Max Memory Used: 18 MB	

I'm using the docker image eawsy/aws-lambda-go-shim:latest - I've tried the two different versions of github.com/eawsy/aws-lambda-go-core available, aa9f99 and 2d5865, but both produce the same error.

I've rebuild the docker containers locally to ensure that along the way it's the same version of the plugin which is being used, but the error persists.

Q: how to get a working setup?

Alright, found the culprit: I'm bundling the source /w gb, so I modified the Makefile to not use my GOPATH, but the vendored folder.

Removing this change fixes the build!

Ok, I was writing a big answer to say such things :)

PS: vendor folder is not yet supported due to golang/go#18827. We will soon provide an auxiliary Docker image to use when vendoring is needed, waiting for the Go team to resolve the issue.