Skip to content

Instantly share code, notes, and snippets.

@creachadair
Last active January 15, 2025 22:09
Show Gist options
  • Save creachadair/1954e01d5558880c6ca072b5a23842f1 to your computer and use it in GitHub Desktop.
Save creachadair/1954e01d5558880c6ca072b5a23842f1 to your computer and use it in GitHub Desktop.
Update installed version of the AWS CLI on a Linux system
#!/usr/bin/env bash
#
# Update the installed version of the AWS CLI on Linux.
#
set -euo pipefail
: ${TMPDIR:=/tmp}
tmp="$(mktemp -d $TMPDIR/awscli.XXXXXXXXXX)"
trap "rm -fr -- '$tmp'" EXIT
pushd "$tmp"
curl -L "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -qo awscliv2.zip
sudo ./aws/install --update
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment