Last active
October 17, 2025 06:59
-
-
Save nauar/c628a15ecb7db608edcdbfc8c543fa22 to your computer and use it in GitHub Desktop.
AWS CLI v2 Installer/updater
This file contains hidden or 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 hidden or 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