AWS Shell: Load and use your AWS identities with all your favorite AWS tools
3.7K

The preferred method of installing and using AWSH is now a Docker container based version that brings you all that you need to run and use AWSH without disrupting your normal OS package setup.
This should make it easier for you to use the latest version and make it easier to rollback an update if a new version breaks something you relied on
From your command line pull and run the latest AWSH image
$ docker run -it --rm hestio/awsh
Create a path to store your AWSH identities
$ mkdir -p ${HOME}/.awsh
Run the AWSH container, passing in your AWSH identities
$ docker run \
-it \
--network=host \
-v ${HOME}/.awsh:/home/awsh/.awsh \
-v ${HOME}:/workspace \
-v /tmp:/tmp \
hestio/awsh
Create a path to store your AWSH identities
$ mkdir -p ${HOME}/.awsh
Run the AWSH container, passing in your AWSH identities and your Kerberos setup and your proxy environment
$ docker run \
-it \
--network=host \
-v ${HOME}/.awsh:/home/awsh/.awsh \
-v /etc/krb5.conf:/etc/krb5.conf \
-v /etc/krb5.conf.d/:/etc/krb5.conf.d/ \
-v ${HOME}:/workspace \
-v /tmp:/tmp \
-e "http_proxy=${http_proxy}" \
-e "https_proxy=${https_proxy}" \
-e "no_proxy=${no_proxy}" \
-e "KRB5CCNAME=${KRB5CCNAME}" \
hestio/awsh
Create the wrapper script /usr/local/bin/awsh
#!/bin/bash
PUID=$(id -u)
PGID=$(id -g)
[ -d ${HOME}/.awsh ] || mkdir -p ${HOME}/.awsh
docker run \
-it \
--rm \
--network=host \
--user ${PUID}:${PGID} \
-v ${HOME}/.awsh:/home/awsh/.awsh \
-v /etc/krb5.conf:/etc/krb5.conf \
-v /etc/krb5.conf.d/:/etc/krb5.conf.d/ \
-v ${HOME}/workspace:/home/awsh/workspace \
-v /tmp:/tmp \
-e "HOME=/home/awsh" \
-e "PUID=${PUID}" \
-e "PGID=${PGID}" \
-e "http_proxy=${http_proxy}" \
-e "https_proxy=${https_proxy}" \
-e "no_proxy=${no_proxy}" \
-e "KRB5CCNAME=${KRB5CCNAME}" \
hestio/awsh
Make the wrapper executable
sudo chmod a+x /usr/local/bin/awsh
Start the wrapper script normally
awsh
Content type
Image
Digest
sha256:0e5fbb70f…
Size
254.8 MB
Last updated
almost 2 years ago
docker pull hestio/awsh