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

How to use/build the plugin on Mac M1 architecture? #26

Open
olivier-schmitt-sonarsource opened this issue Dec 15, 2021 · 11 comments
Open

Comments

@olivier-schmitt-sonarsource
Copy link

olivier-schmitt-sonarsource commented Dec 15, 2021

Hi,

After a MacOs upgrade Monterey 12.1 Rosetta has been removed from my laptop.

I got:
bad CPU type in executable: /usr/local/bin/session-manager-plugin

I can not run the plugin anymore.

Do you plan to provide this plugin for M1 soon?
Is there a Python alternative to this plugin?
How to build it for M1?

Thanks.

@AndrewFarley
Copy link

AndrewFarley commented Dec 27, 2021

@olivier-schmitt-sonarsource I believe this is built-into the 2.0 AWS CLI. Please uninstall your current AWSCLI and install 2.0 from this link from aws: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-version.html

Reference: I have stopped using SSH entirely for numerous clients and use SSM daily

@olivier-schmitt-sonarsource
Copy link
Author

olivier-schmitt-sonarsource commented Jan 4, 2022

Just installed the aws-cli/2.4.7 and renamed my /usr/local/bin/session-manager-plugin executable to hide it.

I also ensured that no old CLI v1 was found in the path.

The AWS CLI v2 tries to execute system manager plugin a the start-session such as:
aws ssm start-session --target i-123456789 --document-name AWS-StartPortForwardingSession --parameters portNumber=22,localPortNumber=9100

If it does not found it, it outputs the following:

SessionManagerPlugin is not found. Please refer to SessionManager Documentation here: http://docs.aws.amazon.com/console/systems-manager/session-manager-plugin-not-found

So it seems the plugin is still needed but the CLI manages the integration with plugin.

But, the rosetta emulator which allowed me to run the plugin has been re activated by a trick I found, so I don't have the problem anymore until it's removed again next time.

@rstml
Copy link

rstml commented May 17, 2022

Assuming you're using brew with M1 support, you can simply do brew install session-manager-plugin.

It will be installed under /opt/homebrew/bin/session-manager-plugin which should be in your PATH.

@robdew
Copy link

robdew commented May 19, 2022

brew install session-manager-plugin

this installs the x86_64 architecture not ARM.

❯ file /opt/homebrew/bin/session-manager-plugin
/opt/homebrew/bin/session-manager-plugin: Mach-O 64-bit executable x86_64

@rstml
Copy link

rstml commented May 20, 2022

oh, that's right... I assumed that all packages installed with M1 brew would be arm64. Having said that, this setup works fine for me with rosetta.

@jusunglee
Copy link

@rstml Do you have to do anything special to use or does rosetta automatically handle this under the hood? Like are you running terminal or session-manager-plugin using arch?

@inostia
Copy link

inostia commented Jun 4, 2022

For now, you can install rosetta 2 to run the application.

After running the following command, session-manager-plugin works:
softwareupdate --install-rosetta --agree-to-license

@robdew
Copy link

robdew commented Jun 5, 2022

You can install rosetta 2 to run the application.

Rosetta has adverse performance impacts. I believe this has been discussed in other issues. It's also not a long-term solution.

@amelluk
Copy link

amelluk commented Feb 22, 2023

bump. I cannot find an arm64 session-manager-plugin anywhere. We really need this.

@elyngved
Copy link

bump. I cannot find an arm64 session-manager-plugin anywhere. We really need this.

@amelluk Try the instructions here and make sure the ARM64 tab is selected: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html#install-plugin-macos

@tim-finnigan
Copy link

Version 1.2.463.0 includes support ARM64 for Apple Mac M1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants