Last active
September 7, 2023 16:57
-
-
Save TeemuKoivisto/a99d51a2e4d86ebefad353ab2d4273ae to your computer and use it in GitHub Desktop.
Installs AWS CLI v2 with Bash for Linux x86 / ARM
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
#!/usr/bin/env bash | |
# or for alpine #!/bin/sh | |
######################################################## | |
# Installs AWS CLI v2 https://docs.aws.amazon.com/cli/ # | |
######################################################## | |
# Needs curl or wget and unzip installed | |
# If you are using Alpine, you should use apk directly (because reasons https://github.com/aws/aws-cli/issues/4971) | |
# apk add aws-cli=2.13.5-r0 | |
if [ "$(command -v curl)" ]; then | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "/tmp/awscliv2.zip" && \ | |
unzip "/tmp/awscliv2.zip" -d /tmp && \ | |
/tmp/aws/install | |
else | |
wget -O "/tmp/awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" && \ | |
unzip "/tmp/awscliv2.zip" -d /tmp && \ | |
/tmp/aws/install | |
fi | |
aws --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment