Open the AWS Console, and login into your account..
How to create I Am user_?
The process is that:-...
Step 1) Search IAM services and an IAM dashboard window will open.
Step 2) In the left navigation panel select users.
Step 3) Enter username and check Access key — Programmatic access. Click on add user..
Step 4) Set permission for your user, and check administrator access. Click on add tags.
Step 5)Enter key-vale and click on next.
step 6) Now click on create user button.
Step 7) User is created successfully.
Now ,
To download the software please visit the website.
After installation open cmd and type the
Use Cammand: aws --version
Now , AWS cli was installed sucessfully _..
: )
Nxt movement.....
Step 1) Now we will configuration of cli
The aws configure command is used to set up your AWS CLI, open cmd type the following command.
Now select output format -> JAISON, press enter if already selected.Now select output format -> JAISON,
PRESS ENTER BUTTON ...
Now, we have successfully completed our
AWS configuration....
: )
NOTE:---
If you have any problem...
Mostly the problem was Add Environmental variable....
Go on your windows search bar....
& Search Environmental variable
Click on edit button
Copy the AWS CLI path
Then select name...: AWS -work
Variable : path of aws cli file
Click on done ....
Now , see everything is fine...
*We will lonch Amazon ec2 instence by
AWS CLI....
Step 1) Creating key pair with AWS CLI
Enter the command to create a key pair
Use CAMMAND: aws ec2 create-kay-pair --key-name
To display your key-pair
USE CAMMAND :-
aws ec2 describe-key-pairs --key-name ApniKeyPair
Kay-pair is created sucessfully..
Step 2) Creating Security Groups for Amazon EC2.
You can create a security group for your Amazon Elastic Compute Cloud (Amazon EC2) instances that essentially operates as a firewall, with rules that determine what network traffic can enter and leave.
USE CAMMAND :- aws ec2 create-security-group — my-sg — description “My security group” — vpc-id vpc-1a2b3c4d
group-name: It could be any valid group name.
description:- It could be any related description.
VPC ID :- You can find vpc from here — > goto VPC services → click on VPCs
This is your vpc id use this to create a security group.
NOW, WE HAVE SUCCESSFULLY CREATED A SECURITY GROUP IN AMAZON ec2..
Step 3) Launching an EC2 Instance using AWS CLI.
To launch an Amazon EC2 instance using the AMI you selected..
USE CAMMAND :- aws ec2 run-instances — image-id ami-xxxxxxxx — count 1 — instance-type t2.micro — key-name MyOwnKeyPair — security-group-ids sg-93027894f8 — subnet-id subnet-6e7f829e .
IMAGE ID :- To find the image id goto ec2 console → click on launch instance → select machine image and copy its image id(we are selecting amazon LINUX).
KEY NAME- We have already created key pair.
SUB-NET-ID :- To find subnet id goto — > ec2 management console → click on launch instance → goto network settings → click edit (because it is deafult) and select any subnet other than 1c beacuse t2.micro does not work in 1c, and copy its id.:
SECURITY GROUP- we have already created a security group.
We have successfully launched Amazon ec2 by AWS CLI....
: )
Nxt:-----------
We will attach Ebs volume to our ec2 instence by AWS CLI....
You have to create an EBS volume in the same availability zone that of your EC2 instance to attach it to EC2 instance.
USE CAMMAND :- aws ec2 create-volume — volume-type gp2 — size 8 — availability-zone us-east-1b
Now attach EBS volume to ec2 instance.
USE CAMMAND :- aws ec2 attach-volume — volume-id (your volume id) — instance-id (instance id) — device /dev/sdf
To upload an object to S3 bucket use command :- aws s3 cp object_name s3://bucketnameTo upload an object to S3 bucket
USE CAMMAND:- aws s3 cp object_name s3://BUCKET NAME
Now make object public using acl to access it.
USE CAMMAND :- aws s3api put-object-acl — bucket (bucketname) — key (object-name) — acl-public-read.
NOW EVERYONE CAN ACCESS THE OBJECT PUBLICLY
I HOPE ...
MY BLOG CAN HELP YOU ..
THANK YOU....
: )
Have a great day.....
😉😉😉
टिप्पणियाँ
एक टिप्पणी भेजें