-
Notifications
You must be signed in to change notification settings - Fork 3
/
install-aws-cli.sh
37 lines (32 loc) · 1018 Bytes
/
install-aws-cli.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# This script will install AWS CLI tool
# Create by Prasenjit Kar ([email protected])
# Version 0.1
# Check AWS CLI installed or not
# If not installed it will start download and install
if ! type "aws" > /dev/null; then
echo "Installing AWS ..."
echo "Downloading AWS CLI package and unzip"
wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
echo "Execute below command with root priviledge in different terminal"
echo ""
echo ""
echo ""
echo "sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws"
echo ""
echo ""
echo "Create Security file in your user ID"
mkdir ~/.aws
touch ~/.aws/config
cat <<EOF > ~/.aws/config
[default]
aws_access_key_id=< PUT YOUR ACCESS KEY >
aws_secret_access_key=< PUT YOUR SECRET ACCESS KEY >
region=ap-southeast-2
output=text
EOF
else
echo "AWS CLI is already Installed."
fi