High availability aws cloud infrastructure using CloudFront

High availability aws cloud infrastructure using CloudFront


This architecture includes :-

?? Webserver configured on EC2 Instance

?? Document Root(/var/www/html) made persistent by mounting on EBS Block Device.

?? Static objects used in code such as pictures stored in S3

?? Setting up Content Delivery Network using CloudFront and using the origin domain as S3 bucket.

?? Finally place the Cloud Front URL on the webapp code for security and low latency.

Note:- all the steps discussed above should be done using the aws cli

  • First we have to launch an instance :-
No alt text provided for this image

now here we can see the instance is launched.

  • Now we have to create an EBS volume :-
No alt text provided for this image

here we can see the EBS volume of 1GB in size is created and we can also confirm this using the AWS GUI : the volume is created and it is available

No alt text provided for this image
  • Attach this EBS volume to the instance launched:-
No alt text provided for this image

here we can see the volume is attached to the instance

No alt text provided for this image
  • Now we have to create the partition in this EBS volume:-
No alt text provided for this image
  • Formating the partition :-
No alt text provided for this image
  • Mount the partition:- now we have to mount the partition to the /var/www/html to make the webserver root document persistent , for this we have to use this command
ssh -i hadoop_slave_key.pem [email protected] sudo mount /dev/xvdc /var/www/html

here we can also see with the help of instance terminal that the partition is mounted to the /var/www/html

No alt text provided for this image
  • now we have to configure the webserver in the launched instance :- for launching the instance we have to follow these steps : -
  1. install the webserver :- here we are installing the apache webserver
No alt text provided for this image

2. start the services:- here we can see the services is running

No alt text provided for this image
  • Now we have to create the S3 bucket for storing the object:-
No alt text provided for this image

we can also verify this using the AWS GUI that bucket deepak9031 is created :

No alt text provided for this image
  • Making the bucket public:-
No alt text provided for this image
No alt text provided for this image
  • Putting the object in this bucket :- for this we have to give the bucket name in which the object will be stored and we also have to give the location of that object
No alt text provided for this image
  • Making the object public:- for this we have to give the permission and here i am giving the permission to public-read-write with the help of this command
aws s3api put-object-acl --acl public-read-write --bucket deepak9031 --key deepak1.jpeg
  • Setting the cloudfront:- for this we have to give the origin domain name and the name of the object for which we are creating the distribution
No alt text provided for this image

here we can see distribution is created :

No alt text provided for this image
  • Now the last step is we are creating a html page in this webserver in which we are using this distribution for low latency using cli :- file name is arth_task6.html
No alt text provided for this image
No alt text provided for this image

CONCLUSION = We can see the file is successfully created and for storing the code we used EBS volume and for storing the object we use S3 services of aws and for reduce the latency we set a distribution for providing the content delivery network using cloudfront , and this distrubution is used inside the page for object.

THANK YOU FOR READING THIS ARTICLE .........

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

Deepak Kumar Pandia的更多文章

  • Configuring a multinode Hadoop Cluster over AWS using : Ansible

    Configuring a multinode Hadoop Cluster over AWS using : Ansible

    Hello everyone..

    2 条评论
  • Deploy WordPress with Amazon RDS using Ansible

    Deploy WordPress with Amazon RDS using Ansible

    Hope you’re doing great !! Welcome to another article , in this article we are going to deploy wordpress with Amazon…

  • Kubernetes: Revolutionizing Industries

    Kubernetes: Revolutionizing Industries

    Introduction:- Kubernetes is a powerful open-source system, initially developed by Google, for managing containerized…

    1 条评论
  • lvm integration with hadoop

    lvm integration with hadoop

    First we have to create and attach a new physical harddisk, and we can see new hard disk /dev/sdb of 150GB in size now…

  • Http server configure in docker container : -

    Http server configure in docker container : -

    for configuring the webserver first we have to start the docker : for starting the docker we have to give this command…

    1 条评论
  • what is aws cli?

    what is aws cli?

    The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and…

    3 条评论

社区洞察

其他会员也浏览了