{"action":"created","issue":{"url":"https://api.github.com/repos/eawsy/aws-lambda-go/issues/9","repository_url":"https://api.github.com/repos/eawsy/aws-lambda-go","labels_url":"https://api.github.com/repos/eawsy/aws-lambda-go/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/eawsy/aws-lambda-go/issues/9/comments","events_url":"https://api.github.com/repos/eawsy/aws-lambda-go/issues/9/events","html_url":"https://github.com/eawsy/aws-lambda-go/issues/9","id":188814594,"number":9,"title":"awesome package","user":{"login":"Zambiorix","id":485492,"avatar_url":"https://avatars.githubusercontent.com/u/485492?v=3","gravatar_id":"","url":"https://api.github.com/users/Zambiorix","html_url":"https://github.com/Zambiorix","followers_url":"https://api.github.com/users/Zambiorix/followers","following_url":"https://api.github.com/users/Zambiorix/following{/other_user}","gists_url":"https://api.github.com/users/Zambiorix/gists{/gist_id}","starred_url":"https://api.github.com/users/Zambiorix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zambiorix/subscriptions","organizations_url":"https://api.github.com/users/Zambiorix/orgs","repos_url":"https://api.github.com/users/Zambiorix/repos","events_url":"https://api.github.com/users/Zambiorix/events{/privacy}","received_events_url":"https://api.github.com/users/Zambiorix/received_events","type":"User","site_admin":false},"labels":[{"id":467160316,"url":"https://api.github.com/repos/eawsy/aws-lambda-go/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":475938614,"url":"https://api.github.com/repos/eawsy/aws-lambda-go/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-11T17:52:06Z","updated_at":"2016-11-15T13:20:56Z","closed_at":null,"body":"Hi guys,\r\n\r\nThis package is golden! Just what I have been looking for!\r\n\r\nI threw out all my node.js code and have written a single aws lambda in go that takes care of all my AWS API Gateway routes. Combined with the official AWS Go SDK, and you have an api backend that is blazing fast, yet ZERO maintenance ... just WOW!\r\n\r\nI would suggest only minor changes to split the package in 2 parts:\r\n\r\nI have created an api-package that will handle all incoming requests from the lambda handler, with no dependencies on aws-lambda-go itself, because I want it to be used in a test app on my mac, as well as in the final deployment package. Building the deployment on my mac and then submitting it to AWS is too slow for testing.\r\nI have created the deployment package with aws-lambda-go & my api-package dependencies and forward all lambda handler calls to my api, with the event and context data. That works great (slow build, but that is ok for deployments)\r\nI have created a mac test application with my api-package dependency and route all kinds of test calls to my api with dummy event & context data to quickly test my api.\r\nThe problem with this scenario is context.go. I need it in my api-package and mac application without all the other code (that won't compile in a mac environment -> I don't want to install all the needed dependencies that you use in the docker image)\r\n\r\nCurrently context.go is in:\r\ngithub.com/eawsy/aws-lambda-go/service/lambda/runtime\r\n\r\nIf you would put it in:\r\ngithub.com/eawsy/aws-lambda-go/service/lambda/context\r\n\r\n.. then all would be perfect for me, I can add it to my api-package and mac test application without all the other code. The imports need to be updated of course, but that is not breaking I assume.\r\n\r\nHope it make sense?\r\n\r\nThanks!\r\nGerd\r\n\r\nPs. where do I send the keg of beer?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eawsy/aws-lambda-go/issues/comments/260639223","html_url":"https://github.com/eawsy/aws-lambda-go/issues/9#issuecomment-260639223","issue_url":"https://api.github.com/repos/eawsy/aws-lambda-go/issues/9","id":260639223,"user":{"login":"fsenart","id":515714,"avatar_url":"https://avatars.githubusercontent.com/u/515714?v=3","gravatar_id":"","url":"https://api.github.com/users/fsenart","html_url":"https://github.com/fsenart","followers_url":"https://api.github.com/users/fsenart/followers","following_url":"https://api.github.com/users/fsenart/following{/other_user}","gists_url":"https://api.github.com/users/fsenart/gists{/gist_id}","starred_url":"https://api.github.com/users/fsenart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsenart/subscriptions","organizations_url":"https://api.github.com/users/fsenart/orgs","repos_url":"https://api.github.com/users/fsenart/repos","events_url":"https://api.github.com/users/fsenart/events{/privacy}","received_events_url":"https://api.github.com/users/fsenart/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T13:20:56Z","updated_at":"2016-11-15T13:20:56Z","body":"@Zambiorix I've resolved yesterday problem by using custom tags instead of official tags. Now you have the same benefit but without compromising packages wich still need cgo.\r\n\r\nTo build your project (in the meantime of merging the PR into the main repo and updating the Docker repo) you need to change the build by appending `-tags proxy` to the command line.\r\nYou can achieve this in two ways. Or you create a custom Docker image and change the [entrypoint](https://github.com/eawsy/aws-lambda-go/blob/master/_docker/entrypoint.go#L38) as follows:\r\n```go\r\ncmd := exec.Command(\"go\", \"build\", \"-buildmode=c-shared\", \"-ldflags=-w -s\", \"-tags\", \"proxy\", \"-o\", so)\r\n```\r\nor you log into the docker image directly and make your build manually:\r\n```sh\r\ndocker run --rm -v $GOPATH:/go -v $PWD:/tmp -it --entrypoint bash eawsy/aws-lambda-go\r\ngo build -buildmode=c-shared -ldflags='-w -s' -tags proxy -o handler.so\r\nzip handler.zip handler.go\r\n```\r\n\r\nAfter merging the PR and updating the Docker image there is nothing special todo. "}}
{"actor":{"display_login":"fsenart"}}