??????????? ??????? ???????????????????????? ???????????????????????? ???????? ?????? ?????

??????????? ??????? ???????????????????????? ???????????????????????? ???????? ?????? ?????


?? TASK DESCRIPTION

??? ???????????? ???????s

?? ???s????? ?????????? ?? ???? ??s?????

?? ???????? ????(/???/???/????) ???? ???s?s???? ?? ???????? ?? ??s ????? ??????.

?? s????? ??????s ?s?? ?? ???? s??? ?s ???????s s????? ?? s??

?? s?????? ?? ??????? ???????? ??????? ?s??? ?????????? ??? ?s??? ??? ?????? ?????? ?s s?? ??????.

?? ??????? ????? ??? ????? ????? ??? ?? ??? ?????? ???? ??? s??????? ??? ??? ???????.

Lets start Doing Task:

C?????????? ?? ??????-???????? ???????? ?????????????? ????????

No alt text provided for this image

Let’s confirm from AWS portal key has been created or not

No alt text provided for this image

Create Security Group:

No alt text provided for this image

Confirm From Aws Portal

No alt text provided for this image

?????? ?????? ?????? ??????? ???????????????? ?????????? ????? ???????? ?????????????? ?????? ????????? ???? ???? ?????????????? ???????? ???????????????????? ??????? ??????? ???????????????? ??????????

?????? ?? ???????? ???????????? ?? ?????????????? ???????? ???????? ???????? ?????????? ???????? ???????????? ???? ?????? ???????? ???????????? ????

No alt text provided for this image

Confirm From Aws Portal

No alt text provided for this image

??????????? ????? ???????????????? ???????? ????? ?????? ?????? ???? ??????? ????????????????, ???? ???????? ?????????????????? ?????? ?????????????????? ?????? ?????????????? ????????? ??????????????????.

No alt text provided for this image
aws ec2 run-instances --image-id { } --instances-type { } --count {} --subnet-id {} --security-group-ids {} --keyname {}

Instance has been launched successfully.

No alt text provided for this image

it's time to perform the first step - means configure the webserver.

To configure webserver we use "httpd" software. First, we install the software

No alt text provided for this image

The next step would is to add the web pages, but before attaching the volume so that webpage becomes persistent.

Step-2: Document Root(/var/www/html) made persistent by mounting on EBS Block Device.

Before proceed to step to we create one EBS volume and then we mount the root directory (/var/www/html) on the ebs volume. This volume we create because we want to store all my website pages in a separate volume so that due to any reason if my OS crashes, in that case, we do not lose the data.

No alt text provided for this image
aws ec2 create-volume --avalability-zone {} --size {} --volume-type {}

New volume of 1gb has created which is not in use.

No alt text provided for this image


Once you create the volume then attach with the Instances.

No alt text provided for this image
aws ec2 atatch-volume --device {} --instance-id {} --volume-id {}

Now the volume is attached to instances and it is now in use.

No alt text provided for this image


Once it is attached, but cannot use it until you do not make a partition and format it.

CREATING PARTITION

No alt text provided for this image
No alt text provided for this image
fdisk {device name}

FORMATING THE PARTITION

No alt text provided for this image
mkfs.ext4 {device name}

After format, mount root directory of httpd(/var/www/html) with the EBS volume Created .

No alt text provided for this image

This make /var/www/html made persistent.

I develop the code in html which consist of some images which is a static.

We generally put the static content in the S3. For this crate one S3 bucket and put the static content.

No alt text provided for this image
aws s3api create-bucket --bucket task6bucket --region ap-south-1 --create-bucket-configuration LocationConstraint=ap-south-1

We can check from AWS portal that s3 bucket has created

No alt text provided for this image

There is no file in the s3 bucket.

No alt text provided for this image

Now i will upload the object i.e. image used in my code in the bucket.

No alt text provided for this image
aws s3 cp {obejct name} s3://{bucketname} --acl public-read-write

acl refers to the Access Control List. acl is one of the resource-based access policy, that you can manage the bucket access.

we can check from AWS portal that image is uploaded or not.

No alt text provided for this image

Finally, place the Cloud Front URL on the web app code for security and low latency.

Now it's time to create Cloud Front in the AWS so that our content would reach each edge location spread all over the world.

aws cloudfront create-distribution --origin-domain-name {}


No alt text provided for this image
No alt text provided for this image

Now I will write the html code inside the /var/www/html folder. Inside this code I will give the url that is generated from cloud front

Now we can proceed with making HTML pages for the website.

No alt text provided for this image

Now I will start the service of httpd

No alt text provided for this image

Now using instance ip i will access my webpage from Browser.

No alt text provided for this image

Hope Tнι? Arтιcle wιll вe U?efull ι? тerм o? υ?der?тα?dι?? тнe a?pecт o? AWS нι?н Avαιlαвιlιтy Arcнιтecтυre .

Tнα??yoυ !!!!

要查看或添加评论,请登录

Manmohan .的更多文章

社区洞察

其他会员也浏览了