Last active
September 29, 2022 14:48
AWS CLI v2 Installer/updater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function log() { | |
ts=`date '+%d/%m/%Y %H:%M:%S'` | |
echo "[ $ts ] $1" | |
} | |
export AWS2_BIN_DIR=~/bin | |
export AWS2_INSTALL_DIR=~/Software/aws/awscli/installdir | |
log 'Downloading latest_version...' | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
log 'Unzipping content...' | |
mv aws aws-$(date +%Y%m%d) | |
unzip awscliv2.zip | |
log 'Installing...' | |
./aws/install --bin-dir $AWS2_BIN_DIR --install-dir $AWS2_INSTALL_DIR --update | |
log 'Installation completed! Checking new version:' | |
aws --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKDIR=~/Software/aws/awscli/ssm-plugin/workdir | |
BINDIR=~/bin | |
mkdir -p $WORKDIR | |
cd $WORKDIR | |
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "$WORKDIR/session-manager-plugin.deb" | |
ar x session-manager-plugin.deb | |
tar xfvz data.tar.gz | |
mv ./usr/local/sessionmanagerplugin/bin/session-manager-plugin $BINDIR | |
rm -rf $WORKDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment