Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

Friday, December 11, 2020

AWS CLI Commands - Mithun Technologies - 99809 23226

 

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com


                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

                                                      AWS CLI Commands

The AWS CLI is an open-source  tool which we can use to connect to AWS account , manage your AWS resources and services from command line interface.

 

Using AWS CLI we can automate manual AWS tasks through pragmatically.

 

Note: Installing AWS CLI we need to install Python (Python 2 version 2.6.5+ or Python 3 version 3.3+) first.

 

#aws -version: It will display the AWS CLI version which you have installed.

 

#aws configure: Using this command we can configure AWS Access Key ID, AWS Secret Access Key, region and output format.
 

An AWS CLI command has the following structure:

 

#aws <command> <subcommand> [options and parameters]

---------------------------------------------------------------------------------------------------------------------

Elastic Cloud Compute (EC2)

 

#aws ec2 describe-instances: It will display all the ec2 instances.

 


 

#aws ec2 describe-instances --filters "Name=instance-type, Values=t2.micro”: It will display all the ec2 instances which are having the instance type is t2.micro.

 

# aws ec2 describe-instances --filters "Name=tag:Name, Values=RedHat Server": It will display all the ec2 instances which are having the Tag name is "RedHat Server".

 

#aws ec2 terminate-instances --instance-ids i-0cf83a9889a47e9e8: It will delete the instance ids which you specified.

 

See Below output after running above command.

 

i-0cf83a9889a47e9e8 à ec2 instance id.

 


 

Below screenshot from AWS admin console.

 


 

 

#aws ec2 describe-instances --filters Name=instance-state-name,Values=stopped --region ap-south-1 --output table : It will display all instances that are currently stopped.

#aws ec2 describe-instances --filters Name=instance-state-name,Values=stopped --region ap-south-1 --output table : It will display all instances that are currently stopped.

------------------------------------------------------------------------------------------------------

Identity and access management (IAM)

 

#aws iam list-users --output table: It will display users in a table format.


 Here

  • ARN: It is the Amazon resource name to identify the user
  • Create Date: It is the user creation date in ISO 8601 date-time format
  • User ID: It is a unique id of each IAM user
  • User Name: It is a friendly user name that we specify while creating the IAM user.

#aws iam create-user --user-name ruthvik: It will create an IAM user.

 


 

---------------------------------------------------------------------------------------------------------------------

Simple Storage Service (S3)

 

 

#aws s3 ls: It will display all the S3 buckets.

 

---------------------------------------------------------------------------------------------------------------------

Virtual Private Cloud (VPC)

 

 

---------------------------------------------------------------------------------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

References

https://docs.aws.amazon.com/cli/latest/index.html

 

 


 


Monday, September 28, 2020

AWS CLI Installation in Linux RHEL 8 - Mithun Technun Technologies - +91 99809 23226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com


                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 

                                                      AWS CLI Installation

#Login as a root user 

sudo su -
yum update -y

#Download  the AWS CLI  software
cd /opt
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip


#Install AWS CLI software
 ./aws/install

#Check the version using below command
aws --version

#Configure AWS User
aws configure

 

 

Thursday, September 12, 2019

Convert pem(Privacy-Enhanced Mail) file to ppk(PuTTY Private Key) file - Mithun Technologies +91-9980923226

  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Step1) To convert .pem file to .ppk , we need to use the puttygen software.
Download the puttygen(for 64 bit Windows OS) software by using below url.


https://the.earth.li/~sgtatham/putty/latest/w64/puttygen.exe



Step2) Open the puttygen software.

Click on puttygen.exe icon.



Once you have double clicked on puttygen.exe file, it will open the below screenshot.

Step3) Load the pem file as follows.
Click on Load button and select the pem file and click on Open, as follows.


Once you have clicked on Open, you will see below popup, click on OK button.



Step4) Save the ppk file.

Click on Save private key button and select the path to store the ppk file as follows.




Give the filename for ppk file and click on Save button as follows.




Click on close symbol, once you have successfully generated.



Step5) Login into AWS EC2 instance  using ppk file as follows.

Download the putty software (for 64 bit Windows OS) from below url if you don’t have downloaded already from below url.


Once you have downloaded the putty software copy the putty software executable file (putty.exe) from Downloads folder to Desktop.

Open the Putty software. (Double click on putty.exe file), as follows.


Give the IP address of which server you want to connect as follows.


Select the ppk file
Expand on SSH --> Expand Auth --> Click on Browse and select the ppk file and click on Open button as follows.

Give the username as ec2-user for RHEL instance and hit the Enter button.



Type exit command for disconnecting.



Ansible Installation in Amazon Linux - Mithun Technologies - 9980923226

  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com                                                 ...