Skip to content

Users unable to get get build-lambda-zip (Failed on MacOS, Windows 10 and 11) #463

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

Closed
duaneking opened this issue Aug 19, 2022 · 14 comments · Fixed by #464 · May be fixed by awsdocs/aws-lambda-developer-guide#388
Closed

Comments

@duaneking
Copy link

duaneking commented Aug 19, 2022

Windows users can not get build-lambda-zip

Repro Steps
On a clean win10 or win11 machine (this repos on both of mine) open an admin console:

go get -v -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip

Actual Result: <no output from command, no binaries created in any directory>

No binaries get downloaded or build, nothing ends up in any of the bin directories.

@duaneking duaneking changed the title Sometime in the last 3/4 days we are no longer able to get build-lambda-zip Repro Steps On a clean machine (e.g. CodeBuild) go get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip Actual Result # github.com/aws/aws-lambda-go/cmd/build-lambda-zip go/src/github.com/aws/aws-lambda-go/cmd/build-lambda-zip/main.go:19:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal: cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver) Expected No errors Windows users cant get build-lambda-zip Aug 19, 2022
@duaneking
Copy link
Author

I have reproduced this on a brand new clean install of win11 as well as an older install of win10.

All attempts to get the tools needed to deploy simply fail with no error message or output of any kind.

No tools are added to any ./bin/ folder.

@duaneking
Copy link
Author

duaneking commented Aug 19, 2022


>go.exe get -v -x -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip
# get https://proxy.golang.org/github.com/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/@v/list
# get https://proxy.golang.org/github.com/aws/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/build-lambda-zip/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/list
# get https://proxy.golang.org/github.com/@v/list: 404 Not Found (0.202s)
# get https://proxy.golang.org/github.com/aws/@v/list: 404 Not Found (0.202s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/list: 200 OK (0.208s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/@v/list: 404 Not Found (1.752s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/build-lambda-zip/@v/list: 404 Not Found (1.879s)

@duaneking
Copy link
Author

Looks like dependencies are failing

@duaneking
Copy link
Author

duaneking commented Aug 19, 2022

Its important to note that this is on a brand new install.

No prior versions of anything go related are on the system because its a new win11 box.

@duaneking
Copy link
Author


go.exe get -v -x -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip
# get https://proxy.golang.org/github.com/jmespath/go-jmespath/@v/v0.4.0.mod
# get https://proxy.golang.org/github.com/aws/aws-sdk-go/@v/v1.44.80.mod
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/v1.34.1.mod
# get https://proxy.golang.org/github.com/aws/aws-sdk-go/@v/v1.44.80.mod: 200 OK (0.485s)
# get https://proxy.golang.org/github.com/jmespath/go-jmespath/@v/v0.4.0.mod: 200 OK (0.486s)
# get https://proxy.golang.org/golang.org/x/net/@v/v0.0.0-20220127200216-cd36cc0744dd.mod
# get https://proxy.golang.org/github.com/pkg/errors/@v/v0.9.1.mod
# get https://proxy.golang.org/github.com/jmespath/go-jmespath/internal/testify/@v/v1.5.1.mod
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/v1.34.1.mod: 200 OK (0.510s)
# get https://proxy.golang.org/github.com/pkg/errors/@v/v0.9.1.mod: 200 OK (0.140s)
# get https://proxy.golang.org/golang.org/x/net/@v/v0.0.0-20220127200216-cd36cc0744dd.mod: 200 OK (0.143s)
# get https://proxy.golang.org/github.com/jmespath/go-jmespath/internal/testify/@v/v1.5.1.mod: 200 OK (0.144s)
# get https://proxy.golang.org/golang.org/x/sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod
# get https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.mod
# get https://proxy.golang.org/golang.org/x/term/@v/v0.0.0-20210927222741-03fcf44c2211.mod
# get https://proxy.golang.org/github.com/davecgh/go-spew/@v/v1.1.0.mod
# get https://proxy.golang.org/gopkg.in/yaml.v2/@v/v2.2.8.mod
# get https://proxy.golang.org/github.com/stretchr/objx/@v/v0.1.0.mod
# get https://proxy.golang.org/github.com/pmezard/go-difflib/@v/v1.0.0.mod
# get https://proxy.golang.org/github.com/stretchr/objx/@v/v0.1.0.mod: 200 OK (0.145s)
# get https://proxy.golang.org/gopkg.in/yaml.v2/@v/v2.2.8.mod: 200 OK (0.146s)
# get https://proxy.golang.org/github.com/davecgh/go-spew/@v/v1.1.0.mod: 200 OK (0.147s)
# get https://proxy.golang.org/golang.org/x/term/@v/v0.0.0-20210927222741-03fcf44c2211.mod: 200 OK (0.150s)
# get https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.mod: 200 OK (0.150s)
# get https://proxy.golang.org/golang.org/x/sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod: 200 OK (0.153s)
# get https://proxy.golang.org/github.com/pmezard/go-difflib/@v/v1.0.0.mod: 200 OK (0.153s)
# get https://proxy.golang.org/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod
# get https://proxy.golang.org/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod
# get https://proxy.golang.org/golang.org/x/sys/@v/v0.0.0-20210615035016-665e8c7367d1.mod
# get https://proxy.golang.org/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod: 200 OK (0.143s)
# get https://proxy.golang.org/golang.org/x/sys/@v/v0.0.0-20210615035016-665e8c7367d1.mod: 200 OK (0.142s)
# get https://proxy.golang.org/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod: 200 OK (0.144s)
# get https://proxy.golang.org/github.com/aws/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/build-lambda-zip/@v/list
# get https://proxy.golang.org/github.com/@v/list
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/list: 200 OK (0.162s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/v1.34.1.info
# get https://proxy.golang.org/github.com/aws/@v/list: 404 Not Found (0.167s)
# get https://proxy.golang.org/github.com/@v/list: 404 Not Found (0.167s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/v1.34.1.info: 200 OK (0.148s)
go: downloading github.com/aws/aws-lambda-go v1.34.1
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/v1.34.1.zip
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/v1.34.1.zip: 200 OK (0.154s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/@v/list: 404 Not Found (2.412s)
# get https://proxy.golang.org/github.com/aws/aws-lambda-go/cmd/build-lambda-zip/@v/list: 404 Not Found (2.412s)

@duaneking
Copy link
Author

AWS must have moved stuff on GitHub and broken the download link?

@duaneking
Copy link
Author

Respectfully tagging @calavera as I'm worried this is very broken and its actively blocking deployments from multiple different machines.

@duaneking duaneking changed the title Windows users cant get build-lambda-zip Users unable to get get build-lambda-zip (Failed on Windows 10 and Windows 11) Aug 19, 2022
@duaneking
Copy link
Author

I'm getting the same output on a MBP, so updating title.

@duaneking duaneking changed the title Users unable to get get build-lambda-zip (Failed on Windows 10 and Windows 11) Users unable to get get build-lambda-zip (Failed on MacOS, Windows 10 and 11) Aug 19, 2022
@bmoffatt
Copy link
Collaborator

What version of go are you using?

go 1.18 removed the ability to use go get to install binaries, and should log an error message point you to use go install instead - but, I can see now that this error isn't logged when the working directory contains a go.mod file, which perhaps describes your environment.

https://go.dev/doc/go1.18#go-command

@duaneking
Copy link
Author

duaneking commented Aug 20, 2022

On:

Windows 11 and Windows 10: go version -> go1.19 windows/amd64
OSX: go version -> go1.19 darwin/amd64

I'm just following the official readme; If the documentation needs updated that should be done as well.

Edit: I also have not touched go in a while (since 2021) and am coming back to it after v17 so this was clearly something I missed, but the aws project docs saying to do things that your saying are unsupported are also clearly possibly wrong.

@calavera
Copy link
Contributor

Respectfully tagging @calavera as I'm worried this is very broken and its actively blocking deployments from multiple different machines.

sorry folks, I'm not involved in this package.

shogo82148 added a commit to shogo82148/aws-lambda-go that referenced this issue Aug 20, 2022
go 1.18 removed the ability to use `go get` to install binaries.
we should use `go install` instead.
fixes aws#463
@shogo82148
Copy link
Contributor

I created a pull request #464 fixing the README.

The developers document also should be fixed.

https://docs.aws.amazon.com/lambda/latest/dg/golang-package.html#golang-package-windows

image

shogo82148 added a commit to shogo82148/aws-lambda-developer-guide that referenced this issue Aug 20, 2022
go 1.18 removed the ability to use `go get` to install binaries.
we should use `go install` instead.
fixes aws/aws-lambda-go#463
@duaneking
Copy link
Author

duaneking commented Aug 20, 2022

Docs also need amd64 verses arm64 clarification.

In GO, amd64 is x86 by default, but the docs currently state that arm64 is the expected platform; but if amd64 is used and x86 binaries are uploaded to AWS they do not work on graviton because AWS is expecting arm64 binaries.

Yes the docs all say amd64, not arm64. These are VERY different things.

Again. is it arm64 or amd64?

The docs all say amd64 and yet only arm64 actually works on the platform in my own testing.

@duaneking
Copy link
Author

I can file a separate bug for that if needed, let me know.

Imagine the adoption that this has stopped. Sounds like an expensive documentation bug.

bmoffatt pushed a commit that referenced this issue Aug 21, 2022
go 1.18 removed the ability to use `go get` to install binaries.
we should use `go install` instead.
fixes #463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants