Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still cannot deploy Golang code to AWS Lambda via Serverless Framework (On Windows).. #5614

Closed
lolcoolkat opened this issue Dec 19, 2018 · 13 comments

Comments

Projects
None yet
6 participants
@lolcoolkat
Copy link

commented Dec 19, 2018

Not sure why more people are not bringing this up and trying to get it fixed but.. I cannot deploy my golang code to AWS Lambda via the Serverless Framework on a Windows 10 machine. I don't have any issues on MacOSX or Linux.. so it's an issue on Windows for sure.

I've outlined the issue here: https://forum.serverless.com/t/cant-seem-to-deploy-golang-with-the-serverless-framework-on-windows-permission-issues/6760

I've tried to bring this to the attention to the Serverless team about 6 months ago but nothing has got done about it yet :/ Not sure why.. as this is a pretty big issue. And the fix I don't think would be too big to complete in a short time.

Can someone give me guidance about this..maybe i'm missing something? Thank you!

@dschep

This comment has been minimized.

Copy link
Member

commented Dec 20, 2018

I'll try to spin up a Windows VM and take a look at this soon

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Dec 22, 2018

Thanks @dschep :)

@sebito91 sebito91 self-assigned this Dec 24, 2018

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Jan 6, 2019

Any update on this @dschep @sebito91 :)

@dschep

This comment has been minimized.

Copy link
Member

commented Jan 7, 2019

Sorry, we've both been overwhelmed by other tasks. @sebito91 took a look and as far as I understand his findings, the issue is specifically that go build doesn't correctly set permissions when cross compiling (it does it correctly when building for windows on windows). Is that right Sebastian?

@sebito91

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2019

That's about right @dschep. The interesting thing is when we build for windows on windows all of the permissions are set properly. When we cross-compile for linux on windows the execution bits are not set properly.

When you scp/rsync a file post-build to a linux machine, it's simple enough to just chmod +x the binary and you're off and running. The same cannot be said on Windows as the chmod facility just doesn't work. I'm looking into how we can package this properly via windows-specific permission commands but haven't stumbled onto that solution just yet.

Please bear with us while we figure this out, we'll get you an answer either way shortly!

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Jan 8, 2019

Thanks for the updates @dschep @sebito91 really appreciate it! I'm sure other people are having similar issues to me and will be relieved once this is fixed. Thanks again 👍

@pmuens pmuens added the bug label Jan 16, 2019

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Jan 29, 2019

Sorry to be a bug about this @sebito91 but any new updates :D @pmuens

@pjo336

This comment has been minimized.

Copy link

commented Jan 29, 2019

So just to be clear, even in the windows linux subshell, chmod won't help?

@sebito91

This comment has been minimized.

Copy link
Contributor

commented Jan 29, 2019

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Jan 29, 2019

@pjo336 I believe when I tested with the linux subshell it worked fine. But I guess what i'm looking for is a solution for normal Windows deployment, without the need to use any subsystems :)

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Jan 29, 2019

@sebito91 Theres a GO file here that AWS made that you can use to build binaries before you upload them to AWS, if this helps https://github.com/aws/aws-lambda-go/blob/master/cmd/build-lambda-zip/main.go

I believe it uses the normal zip package in GO.. so idk how hard it would to implement this into the inner-workings of the Serverless Framework since it's written in JS.

https://github.com/aws/aws-lambda-go

@pjo336

This comment has been minimized.

Copy link

commented Jan 29, 2019

@lolcoolkat Interesting, do you mean you did the compilation in linux ss or you compiled and then CHMOD? I have tried quite a bit and still the same error, maybe mine is something else

@lolcoolkat

This comment has been minimized.

Copy link
Author

commented Jan 29, 2019

I compiled in the linux ss.. i'm pretty sure... if I remember correctly. It was awhile ago, however it was kinda annoying having to load Ubuntu every time and development was a pain in the ass. Looking for a native Windows/Serverless solution if possible :(

@lolcoolkat lolcoolkat changed the title Still cannot deploy Golang code to AWS Lambda via Serverless Framework.. Still cannot deploy Golang code to AWS Lambda via Serverless Framework (On Windows).. Feb 3, 2019

dschep added a commit that referenced this issue Feb 8, 2019

@dschep dschep referenced this issue Feb 8, 2019

Merged

Support deploying GoLang to AWS from Windows! #5813

6 of 6 tasks complete

@dschep dschep closed this in #5813 Feb 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.