aws / session-manager-plugin

This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances
Apache License 2.0
259 stars 70 forks source link

How to use it on ArchLinux? #50

Open abarbosa-godaddy opened 1 year ago

abarbosa-godaddy commented 1 year ago

Hi, I would like to use it on Manjaro. It is possible? I didn't find any docs about it.

Yangtao-Hua commented 1 year ago

Hi @abarbosa-godaddy,

Session-manager-plugin now do not have the PKGBUILD file to build on manjaro. But as a work around, you can directly use the binary file under bin/linux_amd64_plugin (build one or copy from other place), copy it to /usr/local/sessionmanagerplugin/session-manager-plugin and create a symlink as /usr/local/bin/session-manager-plugin. verified it works for me. I will take it as a feature request and forward to team. Thanks again for call out it.

Thanks, Yangtao

shanet commented 1 year ago

The AUR package works well for me: https://aur.archlinux.org/packages/aws-session-manager-plugin. It's effectively doing what @Yangtao-Hua described above.

kevincantu commented 1 year ago

I've also had luck grabbing AWS's .deb in a multi-stage docker build and copying the file out:

FROM golang:latest as build1
...
# while we're in Debian, unpack the .deb of session-manager-plugin
# https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html#install-plugin-linux
# https://github.com/aws/session-manager-plugin/releases
# note: latest version June 2 is 1.2.463.0 (and that can be substituted for latest below)
RUN curl -sSLO "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" \
    && dpkg -i "session-manager-plugin.deb"
...

FROM alpine:latest as build2
COPY --from=build1 /usr/local/sessionmanagerplugin/bin/session-manager-plugin /usr/bin/session-manager-plugin