assume-role-arn icon indicating copy to clipboard operation
assume-role-arn copied to clipboard

Errors when using binary from Macbook with M1 chip

Open roertbb opened this issue 3 years ago • 0 comments

When downloading the binary from releases and using it according to the guide I'm getting the following error:

xxx@xxx ~> eval $(assume-role-arn -profile xxx -verbose)                  
/usr/local/bin/assume-role-arn: line 1: syntax error near unexpected token `<'
/usr/local/bin/assume-role-arn: line 1: `<html><body>You are being <a href="https://github-releases.githubusercontent.com/xxx/uuid?X-Amz-Algorithm=xxx&amp;X-Amz-Credential=xxx&amp;X-Amz-Date=xxx&amp;X-Amz-Expires=xxx&amp;X-Amz-Signature=xxx&amp;X-Amz-SignedHeaders=xxx&amp;actor_id=xxx&amp;key_id=xxx&amp;repo_id=xxx&amp;response-content-disposition=attachment%3B%20filename%3Dassume-role-arn-osx&amp;response-content-type=application%2Foctet-stream">redirected</a>.</body></html>'

When following the redirect url I'm getting

<Error>
<Code>AccessDenied</Code>
<Message>Request has expired</Message>
<X-Amz-Expires>300</X-Amz-Expires>
<Expires>2021-08-09T06:07:12Z</Expires>
<ServerTime>2021-08-09T06:40:19Z</ServerTime>
<RequestId>xxx</RequestId>
<HostId>xxx/xxx</HostId>
</Error>

I've solved the problem after cloning the repository and building it locally. It could be related with the fact that I'm using Macbook with M1 chip (runtime.GOOS = darwin, runtime.GOARCH = arm64), while the binary is prepared for Intel chipset (GOOS = darwin, but no GOARCH in Makefile).

Maybe it would be nice to cross-compile and release the binaries for more OS/architectures?

roertbb avatar Aug 09 '21 08:08 roertbb