-
Prerequisite
1. Python 3.x(Recommended 3.4 and above) 2. PIP(PIP is a package manager for Python packages)
Note: If you have Python version 3.4 or later, PIP is included by default.
-
Installation
-
Manual
>py(or python) -m pip install boto3 >py(or python) -m pip install menu
Note: This AWS CLI tool used Menu package for creating the Menu for AWS operations.
Please refer the below link for more details about Menu package . https://pypi.org/project/Menu/#description. -
Using requirements.txt file
-
Go to root dir
AWS_Boto3
-
Run requirements.txt file
>py(or python) -m pip install -r requirements.txt
-
Note:
py
usually does not exist on Linux, unless you set an alias or symlink yourself. You can check withwhich python
andwhich py
to see what these commands actually are. -
- AWS_REGION (default
eu-west-1
) - WINDOWS_AMI_ID (default
ami-035e11a5d21b976ed
) - LINUX_AMI_ID (default
ami-0ce1e3f77cd41957e
) - WINDOWS_FREE_TIER_INSTANCE_TYPE (default
t2.micro
) - LINUX_FREE_TIER_INSTANCE_TYPE (default
t2.micro
) - OWNER_ID
- AVAILABILITY_ZONE (default
eu-west-1a
) - UPLOAD_DIR_FOR_S3 (default
'./s3_upload/'
) - DOWNLOAD_DIR_FOR_S3 (default
'./s3_download/'
) - CPU_ALARM_TOPIC_NAME (default
cpu_alarm
)
- Valid usernames and passwords will to be stored in
passwd.txt
file. - Each line of which will contain a username+password pair, and their AWS access key id and secret access key, all separated by tabs.
-
Go to root dir
AWS_Boto3
-
Run below command
>`py(or python) AwsCli.py`
-
Input User Name and Password for Login
Press-1
for navigate to EC2 Menu.
Press-2
for navigate to EBS Menu.
Press-3
for navigate to S3 Menu.
Press-4
for navigate to Monitoring Menu.
Press-5
for navigate to Setting Menu.
Press-6
for Logout.
Press-7
for Exit.
Press-1
List all instances for the AWS account.
Press-2
Start a specific(stopped) instance.
Press-3
Stop a specific(running) instance.
Press-4
Create an AMI from an existing(running or stopped) instance.
Press-5
Launch a newWindows
orLinux
instance from an existing (free tier) AMI(AMI-ID is predefined inconfig.py
).
Press-6
Go Back.
Press-1
List all volumes.
Press-2
Attach an existing volume to an instance(running or stopped).
Press-3
Detach a existing volume from an instance(running or stopped).
Press-4
Take a snapshot of a specific volume.
Press-5
Create a volume from a snapshot.
Press-6
Go Back.
Press-1
List all buckets.
Press-2
List all objects in a bucket.
Press-3
Upload an object in specific bucket.
Press-4
Download an object from a specific bucket.
Press-5
Delete an object from a specific bucket.
Press-6
Go Back.
Press-1
DisplayCPUUtilization
andMemoryUtilization
metrics, averaged over the last 10 minutes for a specific instance.
Press-2
Set an Alarm for a specific instance if CPU utilization is less than equal to 28%.
Press-3
Boto3 examples of Relational DB Service.
Press-4
Go Back.
Press-1
for disabling the color menu. (defaultenable
)
Press-2
for enable color menu after disabling.
Press-3
for display "Attachment Data" of Volumes in EBS Menu.
Press-4
for hiding "Attachment Data" of Volumes in EBS Menu (defaulthide
)
Press-5
for setting local upload dir path for S3 .From this path files will be display for upload.
Press-6
for setting local download dir path for S3 .Files from S3 will be download in this dir.
Press-7
Go Back.
- Waiter is used in
Start
andStop
instance operation in EC2 Menu.- Waiter is used in
Attach
andDetach
Volume operation in EBS Menu.