blog




  • Essay / Why Amazon Aws S3 is Better for Static Web Hosting

    Table of ContentsMaterialsMethodPerformance AnalysisBusiness Analysis DataAmazon is the world's largest online retail giant. Jeff Bezos incorporated the company in July 1994, launching a website to the public a year later. The original name was supposed to be "Cadabra", but Jeff Bezos misheard it as "Cadaver". Before moving into online retail, the company focused primarily on selling books sold out of Bezos' garage. Today, the company operates internationally. It sells electronic devices to consumers, the company provides computing databases, storage and other AWS services, as well as fulfilling and publishing digital content subscriptions. Say no to plagiarism. Get a tailor-made essay on "Why violent video games should not be banned"?Get the original essayAmazon Web Services (AWS) was launched in 2006 from the internal infrastructure that amazon.com established to manage its online retail operations. It is the first company to offer paid cloud computing models that provide users with computing and storage services. AWS offers services from dozens of data centers available around the world, called Availability Zones (AZs) around the world. AZs are represented as multiple physical data centers and a region is a so-called collection of AZs in geographic proximity that are connected by low-latency network links. AZ customers can instruct virtual machines to replicate data across different AZ zones to provide better infrastructure that can withstand the failure of individual servers or the entire data center. It provides more than 100 services, including: Compute Databases, data management Storage Network Migration, hybrid cloud Management, monitoring Development tools and application services Big data management, analytics Security, governance Artificial intelligence Mobile development Messaging, notifications Other services like Amazon WorkDocs, Amazon WorkSpaces, Amazon AppStream, Amazon IoT Button, AWS Greengrass. The main focus of this project was storage and computing service. Amazon Simple Storage Service (S3) provides scalable object storage for data backups and analytics. Businesses can reduce costs through the use of S3. For example, an IT administrator can store their data and files as S3 objects which can be located in S3 buckets to keep them in a well-organized manner. Amazon Elastic Compute Cloud (EC2) helps provide virtual servers called instances for computing capacity. In this report, I will bring together two of the above services EC2 and S3. Materials In this part of the project, I will elaborate the materials used for the project that helped achieve the project objective and provide their description as follows: Amazon Web Services Management Console. It is a browser-based GUI for AWS to manage services.Terminal (MAC OS). It is similar to CMD which is used in Windows operating system and allows connecting via Secure Shell (SSH) to Centos OS.Cisco AnyConnect Secure Mobility client. It is a program that allows us to connect to the campus server, so that we can access the data in the virtual machine. Centos OS virtual machine that is hosted on the coivcenter1.hh.nku.edu server. It is a Linux-based operating system that is hosted on the coivecenter1.hh.nku.edu.Amazon web service command line interface (CLI). AWS services are managed andconfigured by the CLI called command line tool. Apache HTTP Server on Ubuntu Amazon Elastic Cloud (EC2) instance. This is a web server that helps respond to HTTPS and HTTP requests. Amazon Web Service Elastic Cloud (EC2) and Ubuntu EC2 instance. This is Linux, a virtual machine hosted on Amazon Web Service (AWS) buckets. Amazon Simple Service Storage S3. This is storage hosted on Amazon Web Service. Amazon monthly calculator. It is a calculator used to measure the cost associated with services. Google Chrome web browser. Used to run the web-hosted test. Microsoft Excel. It is used to analyze collected data and provide graphical visual information. Apache HTTP Benchmark Tool, ab.MethodIn this part of the project, I will review the completion of this project using the materials described in the above part of the project. To achieve the final result of the project, I carefully followed the following steps: - Go to your web browser and visit the web page https://console.aws.amazon.com/, create a free tier account and log in you with your credentials when finished. by registering for the account. When you are successfully logged into the console, go to the “AWS Services” search tab, search for the “IAM” service and click on it as shown in the image below. You will see the following screen when you access IAM. This is an identity and access management page. This will help you maintain and configure user access to your account. As you see in the image above on your left side, when you see the navigation bar as an arrow, click on “Users”. There will be a new web page that will display two options: “Add User” and “Delete User”. Click on the “Add User” button and it will guide you to add a new user to the web page as shown in the image below. Once you have completed the HTML form that appears on the web page, remember to check the boxes named Programmatic Access and AWS Management Console Access and Custom Password. Uncheck the box that says Request password reset, then go to the following permission button. When you navigate to the next page, you will be asked to select user permissions. Please note that if no user group is created, you will need to create a group for the user first. As you see in the image below, a group has been created, so just check the box under the selection policy to set the permission limit with admin access, select the group that has been created and go to to the Next: Review button. When you are directed to the next page, you will be asked to review the details provided previously. Finally, when you have verified, click on “Create user”. It will display a success message box and there will be a button to download the .csv file. The .csv file will contain an important access key ID and your secret access key which plays an important role in linking your account to the AWS account using the AWS CLI tool. Open the terminal window [If you are using MAC OS, open the Windows operating system. CMD]. Connect to the NKU Centos OS virtual machine via an SSH connection. Please be advised to be connected via NKU's network, otherwise you will not be able to access it. To access the AWS CLI tool, you will need root access, so upgrade to root access. Enter the “aws configure” command to configure the AWS CLI tool so that you can log in to your AWS account. It will ask you to enter the AWS Access Key ID and then enter the access keyAWS secret, your region name, and the output. This data will be in your .csv file. The next step is to create the EC2 instance. You will need to create a security group to allocate to EC2 before creating the EC2 instance. This can be done by entering the command as shown in the image below: You will need to add rules to the security group by entering the following commands as shown in the image below: [You will need two rules different ones for two different ports, one for SSH. (22) and another for HTTP (80). To check if the rules have been added to your security group, you can use the command “aws ec2scribe-security-groups --group-names your_username”. When you log in to the EC2 instance to log in you will need a key pair and to do this you will use the command “aws ec2 create-key-pair --key-name your_username-key --query 'KeyMaterial' --output text > devenv -key.pem”. In order to make your file accessible only to you you will need to change the file permission by entering the command “chmod 400 devenv-key.pem (Your .pem key)”. Please note that by not changing the permission you will not be able to enter the EC2 instance. To run the instance, enter the command aws ec2 run-instances --image-id ami-d9a98cb0 --count 1 --instance-type t1.micro --key-name your_username-key --security-groups your_username”. [By not noting down the instance ID details, this will result in losing the end goal of the project]. You will need the public IP address or public DNS name of the instances to gain access to the instance. Waiting about 30 seconds, you run the command “aws ec2scribe-instances --instance-ids your_instance_id” (to get network information). As shown in the picture below. To connect to the instance, you will run the command ssh ssh -i devenv-key.pem ubuntu@the_public_IP_address_of_your_instance. A message will appear asking: Are you sure you want to continue connecting (yes/no)? ”, please type “Yes” to continue. When you are promoted, type “sudo -s” to enter root mode. To run the Apache web server on your EC2 instance, enter the command below: apt-get updateapt-get install apache2/etc/init.d/apache2 restartTo edit the index.html file, you will need to modify it by entering the command “vim /var/www/index.html”. To enter Insert mode, press the letter “I” key on the keyboard. To save, press "esc" then ":" + "w" + "q" and press "Enter", after that it will exit you from the editor.xix. When finished, visit http://the_public_IP_address_of_your_instance/ in the web browser. You should see that it works!xx. The EC2 instance is still operational. It has been active since we connected to the AWS virtual machine. In order to install the Apache server and edit the index.html file, we log out of the VM and redirect to the NKU VM to create an S3 bucket "output" to do so. This will help you log out of the AWS root user access account. To achieve the project goal, you will need to configure S3 storage, which can be done by following the command as shown in the image below (make sure to include your username and not the name of user you see below). You will need to create a directory named “s3www”. "Go to this directory and create an html file called "index.html" using vim. When you edit the file, you will need the following content to be included in the file: - It works! This website is hosted by Amazon AWS S3 When you have completed the above step, you will need to download the file and render it.://.