Skip to content

Instantly share code, notes, and snippets.

@sdr01810
Created March 3, 2023 16:39
Show Gist options
  • Save sdr01810/f142bd9b0487b415517050605f7f340f to your computer and use it in GitHub Desktop.
Save sdr01810/f142bd9b0487b415517050605f7f340f to your computer and use it in GitHub Desktop.
Install the latest AWS CLI
#!/bin/sh
## Install the latest AWS CLI.
## By Stephen D. Rogers <inbox.c7r@steve-rogers.com>, 2023-03.
##
set -e
set -o pipefail 2>&- || :
xx() { # ...
echo 1>&2 "${PS4:-+}" "$@"
"$@"
}
##
pkg_fbn="AWSCLIV2.pkg"
pkg_url="https://awscli.amazonaws.com/${pkg_fbn:?}"
#^-- correct as of 2023-03-03
##
xx
xx curl --silent -o "${pkg_fbn:?}" "${pkg_url:?}"
xx
xx sudo installer -pkg "${pkg_fbn:?}" -target /
##
xx
xx which aws
xx
xx aws --version
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment