Skip to content

Instantly share code, notes, and snippets.

@backroot
Last active July 11, 2022 06:44
Show Gist options
  • Save backroot/b22dd4be7caf8bff25c4f4063bde39b5 to your computer and use it in GitHub Desktop.
Save backroot/b22dd4be7caf8bff25c4f4063bde39b5 to your computer and use it in GitHub Desktop.
Setup AWS CLI for CentOS 6
yum update -y nss
yum install -y https://centos6.iuscommunity.org/ius-release.rpm
perl -pi -e "s/enabled\s+=\s+1/enabled = 0/gi" /etc/yum.repos.d/ius.repo
yum install -y --enablerepo=ius python36u python36u-libs python36u-pip
ln -s /usr/bin/python3.6 /usr/bin/python3
ln -s /usr/bin/pip3.6 /usr/bin/pip3
pip3 install awscli --upgrade --user
echo "# PATH for AWS CLI" >> ~/.bashrc
echo "export PATH=~/.local/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
aws configure
AWS Access Key ID [None]: <ID>
AWS Secret Access Key [None]: <KEY>
Default region name [None]: ap-northeast-1
Default output format [None]: json
@nudge-sangbeomhan
Copy link

Hi, I found this post from reddit. It recommends your gist and solves the problem of yum repo issue in other way.
It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment