Cloud Computing Lab Manual Final

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 72

LAB MANUAL

Cloud Computing Lab

Department of computer science and engineering

Document No: Date of Issue Compiled by: Authorized by


MLRIT/CSE&IT/LABMANUAL/ 10-7-2019 Dr. Rajashekar
Cloud Computing Lab Date of Revision Verified by: HOD(CSE)
10-7-2019 &
HOD(IT)

1
Cloud Computing Lab

Course Objectives:
I. To inculcate the concepts of distributed computing
II. To familiarize the concepts of cloud computing and services
III. To explain cloud platform and types of cloud
IV. To explain resource management in cloud

Course Outcomes:
1. Demonstrate the benefits of various distributed computing platforms.
2. Use modern tools to built distributed applications.
3. Explain the middleware architectures used in distributing computing
platforms.
4. Analyze various distributed computing architectures with respect to security,
performance and cost.

Recommended System/Software Requirements:

✔ Intel based desktop PC with minimum of 2.6GHZ or faster processor with at least
256 MB RAM and 40 GB free disk space.
✔ Operating system: Flavor of any WINDOWS
✔ Software: j2sdk1.7
✔ Linux and MySQL
✔ Eclipse or Netbean

2
Introduction To Cloud Computing

Cloud computing is a model for enabling convenient, on-demand network access to a


shared pool of configurable computing resources (e.g., networks, servers, storage,
applications, and services) that can be rapidly provisioned and released with minimal
management effort or service provider interaction .A Cloud is a type of parallel and
distributed system consisting of a collection of inter-connected and virtualized computers
that are dynamically provisioned and presented as one or more unified computing
resource(s) based on service-level agreements established through negotiation between
the service provider and consumers. Cloud computing provides a shared pool of
resources, including data storage space, networks, Computer processing power, and
specialized corporate and user applications.

Architecture

Cloud Service Models

∙Cloud Software as a Service (SaaS)


∙ Cloud Platform as a Service (PaaS)
∙ Cloud Infrastructure as a Service (IaaS)

Cloud Deployment Models:

∙ Public
∙ Private
∙ Community Cloud
∙ Hybrid Cloud

3
LAB CODE

1. Students should report to the concerned lab as per the time table.

2. Students who turn up late to the labs will in no case be permitted to do the
program schedule for the day.

3. After completion of the program, certification of the concerned staff in-charge in


the observation book is necessary.

4. Student should bring a notebook of 100 pages and should enter the readings
/observations into the notebook while performing the experiment.

5. The record of observations along with the detailed experimental procedure of the
experiment in the immediate last session should be submitted and certified staff
member in-charge.

6. Not more than 3-students in a group are permitted to perform the experiment on
the set.

7. The group-wise division made in the beginning should be adhered to and no mix
up of students among different groups will be permitted.

8. The components required pertaining to the experiment should be collected from


stores in-charge after duly filling in the requisition form.

9. When the experiment is completed, should disconnect the setup made by them,
and should return all the components/instruments taken for the purpose.

10. Any damage of the equipment or burn-out components will be viewed seriously
either by putting penalty or by dismissing the total group of students from the lab
for the semester/year.

11. Students should be present in the labs for total scheduled duration.

12. Students are required to prepare thoroughly to perform the experiment before
coming to laboratory.

13. Procedure sheets/data sheets provided to the student’s groups should be


maintained neatly and to be returned after the experiment.

4
INDEX
S.N
Exp.No Name of the Experiment
o
Create a Collaborative learning environment for a particular learning
topic using Google Apps. Google Drive, Google Docs and Google Slides
1 LP1
must be used for hosting e-books, important articles and presentations
respectively
Install Virtual box and create a windows/linux virtual image and analyze
2 LP2
the virtual configuration.
Create Amazon AWS EC2 Linux instance with conceptual understanding
3 LP3
of SSH client software protocol and keys.
Create Amazon AWS EC2 Windows server instance with conceptual
4 LP4
understanding of RDP (Remote Desktop Protocol).
Create cloud storage Bucket using Amazon Simple Storage Service (S3).
Perform the following operations:

a. Create a folder within a S3 Bucket


5 LP5 b. Upload content to S3
c. Change permissions to allow public access of contents.
d. Set Meta Data on an S3 Bucket
e. Delete an S3 Bucket and its content.

Launch and connect to an Amazon Relational Data Base (RDS) Service ,


6 LP6 Use any one from MySQL, Oracle, SQL Server and post greSQL
DataBase engines.
Develop and host a website in Amazon AWS Server (windows/Linux)
7 LP7 that you have created in experiment 3 or 4.

DNS setup in the Route53 in Amazon AWS for a specific domain.


8 LP8
Connect to the server using any FTP Client (Ex: FileZilla) and update the
9 LP9 website content.

10 LP10 Deploy a Word Press blog in Amazon AWS

5
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 1

Objective: Create a Collaborative learning environment for a particular learning topic


using Google Apps. Google Drive, Google Docs and Google Slides must be used for
hosting e-books, important articles and presentations respectively.

Requirement: Google account, Internet Connection.

THEORY:

Google Docs is a free cloud-based suite of tools for creating documents, spreadsheets,
presentations, and more. This tutorial will cover the Spreadsheets application in Google
Docs, in addition to showing you how to access and store your Docs from Google Drive.

Google Docs, Sheets, and Slides are productivity apps that let you create different kinds
of online documents, work on them in real time with other people, and store them in your
Google Drive online — all for free. You can access the documents, spreadsheets, and
presentations you create from any computer, anywhere in the world. (There's even some
work you can do without an Internet connection!) This guide will give you a quick
overview of the many things that you can do with Google Docs, Sheets, and Slides.

Google Docs

Google Docs is an online word processor that lets you create and format text documents
and collaborate with other people in real time. Here's what you can do with Google Docs:

● Upload a Word document and convert it to a Google document


● Add flair and formatting to your documents by adjusting margins, spacing, fonts,
and colors — all that fun stuff
● Invite other people to collaborate on a document with you, giving them edit,
comment or view access
● Collaborate online in real time and chat with other collaborators — right from
inside the document
● View your document's revision history and roll back to any previous version
● Download a Google document to your desktop as a Word, OpenOffice, RTF,
PDF, HTML or zip file
● Translate a document to a different language
● Email your documents to other people as attachments

Google Sheets

Google Sheets is an online spreadsheet app that lets you create and format spreadsheets
and simultaneously work with other people. Here's what you can do with Google Sheets:
6
● Import and convert Excel, .csv, .txt and .ods formatted data to a Google
spreadsheet
● Export Excel, .csv, .txt and .ods formatted data, as well as PDF and HTML files
● Use formula editing to perform calculations on your data, and use formatting
make it look the way you'd like
● Chat in real time with others who are editing your spreadsheet
● Create charts with your data
● Embed a spreadsheet — or individual sheets of your spreadsheet — on your blog
or website

Google Slides

Google Slides is an online presentations app that allows you to show off your work in a
visual way. Here's what you can do with Google Slides:

● Create and edit presentations


● Edit a presentation with friends or coworkers, and share it with others effortlessly
● Import .pptx and .pps files and convert them to Google presentations
● Download your presentations as a PDF, a PPT, or a .txt file
● Insert images and videos into your presentation
● Publish and embed your presentations in a website

Create, name or delete a Google document


Create a Google document
To create a new document, go to your Drive, click the Create button, and select
Document.
A window with a new Google document will open, and you'll be able to edit the
document, share it with other people, and collaborate on it in real-time. Google Docs
saves your document automatically, and you can always access it from your Drive.
Name a document
When you create a new document, Google Docs will name it Untitled by default.
To choose a name other than Untitled, click the File menu, and select Rename. From
here you can choose and confirm your document's title. You can also edit the name by
clicking the title displayed at the top of the page, and making your changes in the dialog
that appears. Titles can be up to 255 characters long.
Delete a document

Delete an item that you own from your Drive

1. From your Drive, select the item(s) you want to delete.


2. From the More menu, choose Move to trash.
3. If you're deleting a shared document that you own, you'll see an option to change
the ownership of the document.
4. The item will be moved to the Trash.
5. To purge individual items from Trash, select them and choose Delete forever. To
purge all your items click Empty Trash in the upper left.

7
Create and save a document
There are different ways of getting started using Google documents: you can create a new
online document, you can upload an existing one, or you can use a template from our
templates gallery.
To create a new document, go to your Drive, click the red Create button, and select
Document from the drop-down menu.
As soon as you name the document or start typing, Google Docs will automatically save
your work every few seconds. At the top of the document, you'll see text that indicates
when your document was last saved. You can access your document at any time by
opening your Drive at http://drive.google.com.
To save a copy of a document to your computer, you can download it. In your document,
go to the File menu and point your mouse to the Download as option. Select one of the
following file types: HTML (zipped), RTF, Word, Open Office, PDF, and plain text.
Your document will download to your computer.

Upload a document
You can upload existing documents to Google documents at any time. When you're
uploading, you can either keep your document in its original file type or convert it to
Google Docs format. Converting your document to Google Docs format allows you to
edit and collaborate online from any computer.
Note: When uploaded, images within a document are left as images (rather than being
converted to text by Optical Character Recognition technology).
You can upload the following file types:

● .html
● .txt
● .odt
● .rtf
● .doc and .docx
● .pdf

Follow these steps to upload a document:

1. Click the Upload icon in the top left of your Documents List.
2. Click Files..., and select the document you'd like to upload.
3. Click Open.
4. Check the box next to 'Convert documents, presentations, spreadsheets, and
drawings to the corresponding Google Docs format' if you'd like to be able to edit
and collaborate on the document online. Uploaded document files that are
converted to Google documents format can't be larger than 1 MB.
5. Click Start upload. The uploaded file will appear in your Documents List.

8
9
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 2

Objective: Install Virtual box and VMWare and create a windows/linux virtual
image and analyze the virtual configuration

Requirement: Internet

THEORY:

VirtualBox is an open-source hypervisor software; it allows you to create and run guest
operating systems (“virtual machines”) such as Linux and Windows on top of the existing
operating system (host). VirtualBox may be installed on host operating systems,
including Linux, Windows, Solaris, OS X, and OpenSolaris.

virtualbox.org install VM

10
After installation, you can start VirtualBox as follows:

On a Windows host, in the standard "Programs" menu, click on the item in the

"VirtualBox" group. On Vista or Windows 7, you can also type "VirtualBox" in the
search box of the "Start" menu.

● Creating your first virtual machine:

Click on the "New" button at the top of the VirtualBox Manager window. A wizard will
pop up to guide you through setting up a new virtual machine (VM)

Creating your first virtual machine:


Click on the "New" button at the top of the VirtualBox Manager window.
A wizard will pop up to guide you through setting up a new virtual machine (VM)

● The VM name will later be shown in the VM list of the VirtualBox Manager
window,∙ and it will be used for the VM's files on disk. Even
though any name could be used, keep in mind that once you
have created a few VMs, you will appreciate if you have
given your VMs rather informative names; "My VM" would
thus be less useful than "Windows XP SP2 with OpenOffice".
11
● On the next page, select the memory (RAM) that Virtual Box should allocate
every time the virtual machine is started. The amount of memory given here will
be taken away from your host machine and presented to the guest operating
system, which will report this size as the (virtual) computer's installed RAM.

A Windows XP guest will require at least a few hundred MB RAM to run properly, and
Windows Vista will even refuse to install with less than 512 MB. Of course, if you want
to run graphics-intensive applications in your VM, you may require even more RAM.

So, as a rule of thumb, if you have 1 GB of RAM or more in your host computer, it is
usually safe to allocate 512 MB to each VM. But, in any case, make sure you always
have at least 256 to 512 MB of RAM left on your host operating system. Otherwise you
may cause your host OS to excessively swap out memory to your hard disk, effectively
bringing your host system to a standstill. As with the other settings, you can change this
setting later, after you have created the VM.

12
● Next, you must specify a virtual hard disk for your VM. There are many and
potentially complicated ways in which VirtualBox can provide hard disk space to
a VM (see Chapter 5, Virtual storage for details), but the most common way is to
use a large image file on your "real" hard disk, whose contents VirtualBox
presents to your VM as if it were a complete hard disk. This file represents an
entire hard disk then, so you can even copy it to another host and use it with
another VirtualBox installation

13
Running your virtual machine: To start a virtual machine, you have several options

Double-click on its entry in the list within the Manager window or

select its entry in the list in the Manager window it and press the "Start" button at the top

for virtual machines created with VirtualBox 4.0 or later, navigate to the "VirtualBox
VMs" folder in your system user's home directory, find the subdirectory of the machine
you want to start and double-click on the machine settings file (with a .vbox file
extension). This opens up a new window, and the virtual machine which you selected will
boot up. Everything which would normally be seen on the virtual system's monitor is
shown in the window. In general, you can use the virtual machine much like you would
use a real computer. There are couple of points worth mentioning however.

Saving the state of the machine: When you click on the "Close" button of your virtual
machine window (at the top right of the window, just like you would close any other
window on your system), VirtualBox asks you whether you want to "save" or "power off"
the VM. (As a shortcut, you can also press the Host key together with "Q".)

14
15
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 3

Objective: Create Amazon AWS EC2 Linux instance with conceptual understanding of
SSH client software protocol and keys.

Requirement: Internet

THEORY: We will create a developer account on amazon (aws.amazon.com). We will


work on several exercises to explore the features of amazon cloud and understand how it
can support the existing IT infrastructure you have. We will work on complete example
in collecting live twitter data and performing a simple analysis on the data.
Preliminaries:
1. Create an aws developer account at http://aws.amazon.com
2. Update your credits.
3. Navigate the aws console. Browse through the wide range of infrastructure services
offered by aws.
4. Create an amazon key pair. This is the key-pair we will use for accessing
applications/services on the cloud. Call it Richs2014 or something you will
remember. This is like a key your safety box. Don’t lose. Store Richs1.pem and
equivalent private key for putty Richs2014.ppk in a safe location.
5. Identify the credentials of your amazon; just be knowledge about where to locate
them when you need them for authenticate yourself/your application using these
credentials. https://console.aws.amazon.com/iam/home?#security_credential
6. Identity and Access Management (IAM) is an important service. Read
http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_Introduction.html

Exercise 1: Launch an instance EC2:


1. Click on the first one: Services window🡪 EC2 from the services dashboard🡪Study the
various items🡪 click on the lunch button

Step 1: Choose an AMI (Amazon machine image) for the instance you want: this can be
single CPU machine to a sophisticated cluster of powerful processors.
The instances can be from Amazon Market Place, Community (contributed) AMI, My
own AMIs (that I may have created: Eg.,RichsAMI) Choose a “free-tier” eligible
Windows AMI.
Step 2: Choose an instance type: small, large, micro, medium , etc.
Step 3: Review and launch. We are done, we have Windows machine.
Step 4: Create a new key-pair to access the instance that will be created. We will be
accessing the instance we create using Public-private key pair. Download the pair of the
key and store it.

16
Launch instance. Once it is ready you will use its public IP and the key pair we saved
and the RDP protocol to access the instance on the cloud.

Hosting a static web site on amazon aws.


Overview: Simply load the web site components into an appropriate S3 folder/directories
created. Configure a few parameters, policy file and the web site all set to go!
Step 1:
1. When you host a website on Amazon S3, AWS assigns your website a URL based on
the name of the storage location you create in Amazon S3 to hold the website files
(called an S3 bucket) and the geographical region where you created the bucket.
2. For example, if you create a bucket called richs on the east coast of the United States
and use it to host your website, the default URL will be http://richs.s3-website-us-
east-1.amazonaws.com/.
3. We will not use Route 53 and CloudFront for this proof-of-concept implementation.

Step 2: Enable logging and redirection (note: for some reason this collides with
richs.com)
1. In the logging window enter logs.richs.com and /root in the next box; right click
on www.richs.com properties and redirect it to richs.com
2. In the richs.com bucket, enable web hosting and enter index,html as the index
document. If you an error document, you can ad that in the next box.
3. Click on the endpoint address that shows up in properties window of richs.com
4. You should be able to see the static application.

17
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 4

Objective: Create Amazon AWS EC2 Windows server instance with conceptual
understanding of RDP (Remote Desktop Protocol).

Requirement: Internet

THEORY: An EC2 instance is a virtual server in Amazon Web services terminology. It


stands for Elastic Compute Cloud. It is a web service where an AWS subscriber can
request and provision a compute server in AWS cloud.
An on-demand EC2 instance is an offering from AWS where the subscriber/user can
rent the virtual server per hour and use it to deploy his/her own applications.
The instance will be charged per hour with different rates based on the type of the
instance chosen. AWS provides multiple instance types for the respective business needs
of the user.
Thus, you can rent an instance based on your own CPU and memory requirements and
use it as long as you want. You can terminate the instance when it’s no more used and
save on costs. This is the most striking advantage of an on-demand instance- you can
drastically save on your CAPEX.
Step 1:

● Login to your AWS account and go to the AWS Services tab at the top left corner.
● Here, you will see all of the AWS Services categorized as per their area viz.
Compute, Storage, Database, etc. For creating an EC2 instance, we have to
choose Computeà EC2 as in the next step.

● Open all the services and click on EC2 under Compute services. This will launch
the dashboard of EC2.

18
Here is the EC2 dashboard. Here you will get all the information in gist about the AWS
EC2 resources running.

Step 2: On the top right corner of the EC2 dashboard, choose the AWS Region in which
you want to provision the EC2 server.
Here we are selecting N. Virginia. AWS provides 10 Regions all over the globe.

Step 3:  In this step

● Once your desired Region is selected, come back to the EC2 Dashboard.
● Click on 'Launch Instance' button in the section of Create Instance (as shown
below).

19
Choose AMI
Step 4: In this step we will do,

1. You will be asked to choose an AMI of your choice. (An AMI is an Amazon
Machine Image. It is a template basically of an Operating System platform which
you can use as a base to create your instance). Once you launch an EC2 instance
from your preferred AMI, the instance will automatically be booted with the
desired OS. (We will see more about AMIs in the coming part of the tutorial).
2. Here we are choosing the default Amazon Linux (64 bit) AMI.

Choose EC2 Instance Types


Step 5:  In the next step, you have to choose the type of instance you require based on
your business needs.

1. We will choose t2.micro instance type, which is a 1vCPU and 1GB memory
server offered by AWS.
2. Click on "Configure Instance Details" for further configurations

20
● In the next step of the wizard, enter details like no. of instances you want to
launch at a time.
● Here we are launching one instance.

Step 6: In the next step you will be asked to create a key pair to login to you an instance.
A key pair is a set of public-private keys.
AWS stores the private key in the instance, and you are asked to download the public
key. Make sure you download the key and keep it safe and secured; if it is lost you cannot
download it again.

1. Create a new key pair


2. Give a name to your key
3. Download and save it in your secured folder

● When you download your key, you can open and have a look at your RSA private
key.

21
Step 7: Once you are done downloading and saving your key, launch your instance.

● Click on the 'Instances' option on the left pane where you can see the status of the
instance as 'Pending' for a brief while.
● Click on the 'Instances' option on the left pane where you can see the status of the
instance as 'Pending' for a brief while.

22
● Once your instance is up and running, you can see its status as 'Running' now.
● Note that the instance has received a Private IP from the pool of AWS.

In this tutorial, you will learn how to launch, configure, and connect to a
Windows Virtual Machine using Amazon Elastic Compute Cloud (EC2).
Amazon EC2 is the Amazon Web Service you use to create and run virtual
machines in the cloud (we call these virtual machines 'instances').  Everything
done in this tutorial is free tier eligible.

23
Step 8: Create and Configure Your Virtual Machine
a. You are now in the Amazon EC2 console. Click Launch Instance 

24
 With Amazon EC2, you can specify the software and specifications of the instance you
want to use.  In this screen, you are shown options to choose an Amazon Machine Image
(AMI), which is a template that contains the software configuration required to launch
your instance.  
For this tutorial, find Microsoft Windows Server 2012 R2 Base and click Select.

25
You will now choose an instance type.  Instance types comprise of varying combinations
of CPU, memory, storage, and networking capacity so you can choose the appropriate
mix for your applications. For more information, see Amazon EC2 Instance Types.
For this tutotiral, selct the default option of t2.micro - this instance type is covered within
the free tier. Then click Review and Launch at the bottom of the page.

26
You can review the options that are selected for your instance which include AMI
Details, Instance Type, Security Groups, Instance Details, Storage, and Tags.  You can
leave these at the defaults and click Launch from the bottom of the page.
Note: For detailed information on your options, see Launching an Instance

Step 9: Create a Key Pair and Launch Your Instance


To connect to your virtual machine, you need a key pair. A key pair is used to log into
your instance (just like your house key is used to enter your home).

a. In the popover, select  Create a new key pair and name it MyFirstKey. Then
click Download Key Pair. MyFirstKey.pem will be downloaded to your computer --
make sure to save this key pair in a safe location on your computer. 

● Windows users: We recommend saving your key pair in your user directory in a sub-
directory called .ssh (ex.C:\user\{yourusername}\.ssh\MyFirstKey.pem).
● Mac/Linux users: We recommend saving your key pair in the .ssh sub-directory from
your home directory (ex.~/.ssh/MyFirstKey.pem).

Note: If you don't remember where you store your SSH private key (the file you are
downloading), you won't be able to connect to your virtual machine.

27
b. After you have downloaded and saved your key pair, click Launch Instance to start
your Windows Server instance.
Note: It can take a few minutes to launch your instance.

 On the next screen, click View Instances to view the instance you have just
created and see its status.

28
Step 10: Connect to Your Instance
After launching your instance, it's time to retrieve the administrator password and
connect to it using a Remote Desktop Protocol (RDP) client.
AWS documentation includes information on how to install a RDP client if you need
one. 

a. Select the Windows Server instance you just created and click Connect

29
b.  In order to connect to your Windows virtual machine instance, you will need a user
name and password:

● The User name defaults to Administrator


● To receive your password, click Get Password

.  In order to retrieve the password, you will need to locate the Key Pair you
created in Step 3. Click Choose File and browse to the directory you

30
stored MyFirstKey.pem.   Your Key Pair will surface in the text box.
Click Decrypt Password.

You now have a decrypted password for your Windows Server instance. Make
sure to save this information in a secure location. It is your Windows Server
admin login credentials.

 Click Download Remote Desktop File and open the file.

31
When prompted log in to the instance, use the User Name and Password you generated in
to connect to your virtual machine.
Note: When you complete this step, you might get a warning that the security
certificate could not be authenticated. Simply choose yes and proceed to complete
the connection to your Windows Server instance

Step 11: Terminate Your Windows VM


You can easily terminate the Windows Server VM from the Amazon EC2 console. In
fact, it is a best practice to terminte instances you are no longer using so you don’t keep
getting charged for them.

32
 Back on the EC2 Console, select the box next to the instance you created.  Then click
the Actions button, navigate to Instante State, and click Terminate.

. You will be asked to confirm your termination - select Yes, Terminate.


Note: This process can take several seconds to complete.  Once your instances has
been terminated, the Instance State will change to terminated on your EC2 Console.

33
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 5

Objective: Create cloud storage Bucket using Amazon Simple Storage Service (S3).
Perform the following operations:
a. Create a folder within a S3 Bucket
b. Upload content to S3
c. Change permissions to allow public access of contents.
d. Set Meta Data on an S3 Bucket
e. Delete an S3 Bucket and its content.

Requirement: Internet

THEORY: Before you can upload data to Amazon S3, you must create a bucket in one
of the AWS Regions to store your data in. After you create a bucket, you can upload an
unlimited number of data objects to the bucket.

A bucket is owned by the AWS account that created it. By default, you can create up to
100 buckets in each of your AWS accounts. If you need additional buckets, you can
increase your account bucket limit to a maximum of 1,000 buckets by submitting a
service limit increase. For information about how to increase your bucket limit, see AWS
Service Limits in the AWS General Reference.

Buckets have configuration properties, including their geographical region, who has
access to the objects in the bucket, and other metadata.

a. To create an S3 bucket

1. Sign in to the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3/.
2. Choose Create bucket.

3. On the Name and region page, type a name for your bucket and choose the AWS
Region where you want the bucket to reside. Complete the fields on this page as
follows:
34
a. For Bucket name, type a unique DNS-compliant name for your new
bucket. Follow these naming guidelines:
4.
a. The name must be unique across all existing bucket names in Amazon S3.
b. The name must not contain uppercase characters.
c. The name must start with a lowercase letter or number.
d. The name must be between 3 and 63 characters long.
e. After you create the bucket you cannot change the name, so choose
wisely.
f. Choose a bucket name that reflects the objects in the bucket because the
bucket name is visible in the URL that points to the objects that you're
going to put in your bucket.

For information about naming buckets, see Rules for Bucket Naming in


the Amazon Simple Storage Service Developer Guide.

5. For Region, choose the AWS Region where you want the bucket to reside.
Choose a Region close to you to minimize latency and costs, or to address
regulatory requirements. Objects stored in a Region never leave that Region
unless you explicitly transfer them to another Region. For a list of Amazon S3
AWS Regions, see Regions and Endpoints in the Amazon Web Services General
Reference.
6. (Optional) If you have already set up a bucket that has the same settings that you
want to use for the new bucket that you want to create, you can set it up quickly
by choosing Copy settings from an existing bucket, and then choosing the
bucket whose settings 
7. you want to copy.

The settings for the following bucket properties are copied: versioning, tags, and
logging.

8. Do one of the following:


a. If you copied settings from another bucket, choose Create. You're done,
so skip the following steps.
b. If not, choose Next.

35
On the Configure options page, you can configure the following properties and Amazon
Cloud Watch metrics for the bucket. Or, you can configure these properties and Cloud
Watch metrics later, after you create the bucket.

a. Versioning

Select Keep all versions of an object in the same bucket. to enable object


versioning for the bucket. For more information on enabling versioning

b. Server access logging

Select Log requests for access to your bucket. to enable server access logging
on the bucket. Server access logging provides detailed records for the requests
that are made to your bucket. For more information about enabling server access
logging.

36
B: Upload content to S3

Uploading Files and Folders by Using Drag and Drop

If you are using the Chrome or Firefox browsers, you can choose the folders and files to
upload, and then drag and drop them into the destination bucket. Dragging and dropping
is the only way that you can upload folders.

To upload folders and files to an S3 bucket by using drag and drop

1. Sign in to the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the name of the bucket that you want to upload
your folders or files to.

3. In a window other than the console window, select the files and folders that you
want to upload. Then drag and drop your selections into the console window that
lists the objects in the destination bucket.

37
In the Upload dialog box, do one of the following:

a. Drag and drop more files and folders to the console window that displays the
Upload dialog box. To add more files, you can also choose Add more files. This
option works only for files, not folders.
b. To immediately upload the listed files and folders without granting or removing
permissions for specific users or setting public permissions for all of the files that
you're uploading, choose Upload. For information about object access
permissions,.

C: Change permissions to allow public access of contents.

To set permissions or properties for the files that you are uploading, choose Next.

38
On the Set Permissions page, under Manage users you can change the permissions for
the AWS account owner. The owner refers to the AWS account root user, and not an
AWS Identity and Access Management (IAM) user. For more information about the root
user, see The AWS Account Root User.

Choose Add account to grant access to another AWS account. For more information
about granting permissions to another AWS account, see How Do I Set ACL Bucket
Permissions?.

Under Manage public permissions you can grant read access to your objects to the
general public (everyone in the world), for all of the files that you're uploading. Granting
public read access is applicable to a small subset of use cases such as when buckets are
used for websites. We recommend that you do not change the default setting of Do not
grant public read access to this object(s). You can always make changes to object
permissions after you upload the object. For information about object access permissions,

D: Set Meta Data on an S3 Bucket

Adding System-Defined Metadata to an S3 Object

You can configure some system metadata for an S3 object. For a list of system-defined
metadata and whether you can modify their values, see System-Defined Metadata in the
Amazon Simple Storage Service Developer Guide.

To add system metadata to an object

1. Sign in to the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the name of the bucket that contains the object.

3. In the Name list, choose the name of the object that you want to add metadata to.

39
4. Choose Properties, and then choose Metadata.

5. Choose Add Metadata, and then choose a key from the Select a key menu.

40
6. Depending on which key you chose, choose a value from the Select a value menu
or type a value.

41
7. Choose Save.

42
E: To delete an S3 bucket

1. Sign in to the AWS Management Console and open the Amazon S3 console
athttps://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the bucket icon next to the name of the bucket
that you want to delete and then choose Delete bucket.

In the Delete bucket dialog box, type the name of the bucket that you want to delete for
confirmation, and then choose Confirm.

Note
The text in the dialog box changes depending on whether the bucket is empty, is used for
a static website, or is used for ELB access logs.

43
44
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 6

Objective: Launch and connect to an Amazon Relational Data Base (RDS) Service , Use
any one from MySQL, Oracle, SQL Server and post greSQL DataBase engines . 

Requirement: Internet

THEORY: Launch and connect to an Amazon Relational Data Base (RDS) Service ,
Use any one from MySQL, Oracle, SQL Server and post greSQL DataBase engines.

After you create an Amazon RDS DB instance, you can use any standard SQL client
application to connect to the DB instance. To connect to an Amazon RDS DB instance,
follow the instructions for your specific database engine.

● Connecting to a DB Instance Running the MariaDB Database Engine


● Connecting to a DB Instance Running the Microsoft SQL Server Database Engine
● Connecting to a DB Instance Running the MySQL Database Engine
● Connecting to a DB Instance Running the Oracle Database Engine
● Connecting to a DB Instance Running the PostgreSQL Database Engine

Before you can connect to a DB instance running the MySQL database engine, you must
create a DB instance. For information, see Creating a DB Instance Running the MySQL
Database Engine. Once Amazon RDS provisions your DB instance, you can use any
standard MySQL client application or utility to connect to the instance. In the connection
string, you specify the DNS address from the DB instance endpoint as the host parameter,
and specify the port number from the DB instance endpoint as the port parameter.

To authenticate to your RDS DB instance, you can use one of the authentication methods
for MySQL and IAM database authentication.

● To learn how to authenticate to MySQL using one of the authentication methods


for MySQL, see Authentication Method in the MySQL documentation.
● To learn how to authenticate to MySQL using IAM database authentication.You
can use the AWS Management Console, the AWS CLI describe-db-
instances command, or the Amazon RDS API DescribeDBInstances action to list
the details of an Amazon RDS DB instance, including its endpoint.

To find the endpoint for a MySQL DB instance in the AWS Management Console:

1. Open the RDS console and then choose Databases to display a list of your DB
instances.
2. Choose the MySQL DB instance name to display its details.
45
3. On the Connectivity tab, copy the endpoint. Also, note the port number. You
need both the endpoint and the port number to connect to the DB instance.

If an endpoint value is mysql–instance1.123456789012.us-east-


1.rds.amazonaws.com and the port value is 3306, then you would specify the following
values in a MySQL connection string:

● For host or host name, specify mysql–instance1.123456789012.us-east-


1.rds.amazonaws.com
● For port, specify 3306

You can connect to an Amazon RDS MySQL DB instance by using tools like the
MySQL command line utility. For more information on using the MySQL client, go
to mysql - The MySQL Command Line Tool in the MySQL documentation. One GUI-
based application you can use to connect is MySQL Workbench. For more information,
go to the Download MySQL Workbench page. For information about installing MySQL
(including the MySQL client), see Installing and Upgrading MySQL.

Two common causes of connection failures to a new DB instance are:

46
● The DB instance was created using a security group that does not authorize
connections from the device or Amazon EC2 instance where the MySQL
application or utility is running. If the DB instance was created in a VPC, it must
have a VPC security group that authorizes the connections. If the DB instance was
created outside of a VPC, it must have a DB security group that authorizes the
connections. For more information, see Amazon Virtual Private Cloud (VPCs)
and Amazon RDS.
● The DB instance was created using the default port of 3306, and your company
has firewall rules blocking connections to that port from devices in your company
network. To fix this failure, recreate the instance with a different port.

You can use SSL encryption on connections to an Amazon RDS MySQL DB instance.
For information, see Using SSL with a MySQL DB Instance. If you are using IAM
database authentication, you must use an SSL connection. For information, see IAM
Database Authentication for MySQL and PostgreSQL.

For information on connecting to a MariaDB DB instance, see Connecting to a DB


Instance Running the MariaDB Database Engine.

Connecting from the MySQL Client

To connect to a DB instance using the MySQL client, type the following command at a
command prompt to connect to a DB instance using the MySQL client. For the -h
parameter, substitute the DNS name (endpoint) for your DB instance. For the -P
parameter, substitute the port for your DB instance. Enter the master user password when
prompted.

mysql -h mysql–instance1.123456789012.us-east-1.rds.amazonaws.com -P 3306 -u


mymasteruser -p

After you enter the password for the user, you will see output similar to the following.

Welcome to the MySQL monitor. Commands end with ; or \g.


Your MySQL connection id is 350
Server version: 5.6.40-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Connecting with SSL

Amazon RDS creates an SSL certificate for your DB instance when the instance is
created. If you enable SSL certificate verification, then the SSL certificate includes the
DB instance endpoint as the Common Name (CN) for the SSL certificate to guard against
spoofing attacks. To connect to your DB instance using SSL, you can use native
password authentication or IAM database authentication. To connect to your DB instance
using IAM database authentication, see IAM Database Authentication for MySQL and
47
PostgreSQL. To connect to your DB instance using native password authentication, you
can follow these steps:

To connect to a DB instance with SSL using the MySQL client

1. A root certificate that works for all regions can be downloaded here.


2. Enter the following command at a command prompt to connect to a DB instance
with SSL using the MySQL client. For the -h parameter, substitute the DNS name
for your DB instance. For the --ssl-ca parameter, substitute the SSL certificate file
name as appropriate.

mysql -h mysql–instance1.123456789012.us-east-1.rds.amazonaws.com --ssl-


ca=rds-ca-2015-root.pem -p

3. You can require that the SSL connection verifies the DB instance endpoint against
the 
4. endpoint in the SSL certificate.

For MySQL 5.7 and later:

mysql -h mysql–instance1.123456789012.us-east-1.rds.amazonaws.com --ssl-


ca=rds-ca-2015-root.pem --ssl-mode=VERIFY_IDENTITY -p

For MySQL 5.6 and earlier:

mysql -h mysql–instance1.123456789012.us-east-1.rds.amazonaws.com --ssl-


ca=rds-ca-2015-root.pem --ssl-verify-server-cert -p

5. Enter the master user password when prompted.

You will see output similar to the following

Welcome to the MySQL monitor. Commands end with ; or \g.


Your MySQL connection id is 350
Server version: 5.6.40-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Connecting from MySQL Workbench

To connect from MySQL Workbench

1. Download and install MySQL Workbench at Download MySQL Workbench.


2. Open MySQL Workbench.

48
1. From Database, choose Manage Connections.
2. In the Manage Server Connections window, choose New.
3. In the Connect to Database window, enter the following information:
● Stored Connection – Enter a name for the connection, such as MyDB.
● Hostname – Enter the DB instance endpoint.
● Port – Enter the port used by the DB instance.
● Username – Enter the username of a valid database user, such as the
master user.
● Password – Optionally, choose Store in Vault and then enter and save
the password for the user.

The window looks similar to the following:

49
1. Optionally, choose Test Connection to confirm that the connection to the DB
instance is successful.
2. Choose Close.
3. From Database, choose Connect to Database.
4. From Stored Connection, choose your connection.
5. Choose OK.

For information about using MySQL Workbench, see the MySQL Workbench


documentation.

Maximum MySQL connections

The maximum number of connections allowed to an Amazon RDS MySQL DB instance


is based on the amount of memory available for the DB instance class of the DB instance.
A DB instance class with more memory available will result in a larger amount of
connections available. For more information on DB instance classes, see Choosing the
DB Instance Class.

The connection limit for a DB instance is set by default to the maximum for the DB
instance class for the DB instance. You can limit the number of concurrent connections to
any value up to the maximum number of connections allowed using
the max_connections parameter in the parameter group for the DB instance. For more
information, see Working with DB Parameter Groups.

You can retrieve the maximum number of connections allowed for an Amazon RDS
MySQL DB instance by executing the following query on your DB instance:

50
SELECT @@max_connections;

You can retrieve the number of active connections to an Amazon RDS MySQL DB
instance by executing the following query on your DB instance:

SHOW STATUS WHERE `variable_name` = 'Threads_connected';

51
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7
Experiment No. 7

Objective: Develop and host a website in Amazon AWS Server (windows/Linux) that
you have created in experiment 3 or 4

Requirement: Internet

THEORY: Setting up a Static Website Using a Custom Domain


Suppose that you want to host your static website on Amazon S3. You registered a
domain (for example, example.com), and you want requests for http://www.example.com
and http://example.com to be served from your Amazon S3 content. Whether you have an
existing static website that you want to host on Amazon S3, or you are starting from
scratch, use this example to learn how to host websites on Amazon S3.
Step 1: Register a Domain
Step 2: Create and Configure Buckets and Upload Data
Step 3: Add Alias Records for example.com and www.example.com
Step 4: Testing
As you follow the steps in this example, you work with the following services:
Amazon Route 53 – You use Route 53 to register domains and to define where you want
to route internet traffic for your domain. We explain how to create Route 53 alias records
that route traffic for your domain (example.com) and sub domain (www.example.com) to
an Amazon S3 bucket that contains an HTML file.
Amazon S3 – You use Amazon S3 to create buckets, upload a sample website page,
configure permissions so that everyone can see the content, and then configure the
buckets for website hosting.
Step 1: Register a Domain
If you don't already have a registered domain name, such as example.com, register one
with Route 53.When you have a registered domain name, your next tasks are to create
and configure Amazon S3 buckets for website hosting and to upload your website
content.
Step 2: Create and Configure Buckets and Upload Data
To support requests from both the root domain such as example.com and sub domain
such as www.example.com, you create two buckets. One bucket contains the content.
You configure the other bucket to redirect requests.
Step 2.1: Create Two Buckets
The bucket names must match the names of the website that you are hosting. For
example, to host your example.com website on Amazon S3, you would create a bucket
named example.com. To host a website under www.example.com, you would name the
bucket www.example.com. In this example, your website supports requests from both
example.com and www.example.com.
In this step, you sign in to the Amazon S3 console with your AWS account credentials
and create the following two buckets.

52
● example.com
● www.example.com
Note
Like domains, sub domains must have their own S3 buckets, and the buckets must share
the exact names as the sub domains. In this example, we are creating the
www.example.com sub domain, so we also need an S3 bucket named
www.example.com.
To create your buckets and upload your website content for hosting
1. Sign in to the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3/.
2. Create two buckets that match your domain name and subdomain. For instance,
example.com and www.example.com.
For step-by-step instructions, in the Amazon Simple Storage Service Console User Guide.
3. Upload your website data to the example.com bucket.
You will host your content out of the root domain bucket (example.com), and you will
redirect requests for www.example.com to the root domain bucket. You can store content
in either bucket. For this example, you host content in the example.com bucket. The
content can be text files, family photos, videos—whatever you want. If you have not yet
created a website, then you only need one file for this example. You can upload any file.
For example, you can create a file using the following HTML and upload it to the bucket.
The file name of the home page of a website is typically index.html, but you can give it
any name. In a later step, you provide this file name as the index document name for your
website.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>My Website Home Page</title>
</head>
<body>
<h1>Welcome to my website</h1>
<p>Now hosted on Amazon S3!</p>
</body>
</html>
To host a website, your bucket must have public read access. It is intentional that
everyone in the world will have read access to this bucket. To grant public read access,
attach the following bucket policy to the example.com bucket, substituting the name of
your bucket for example.com. For step-by-step instructions to attach a bucket policy.
{
"Version":"2012-10-17",
"Statement":[{
"Sid":"PublicReadGetObject",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::example.com/*"]
}]
}
1. You now have two buckets, example.com and www.example.com, and you have
uploaded your website content to the example.com bucket. In the next step, you

53
configure www.example.com to redirect requests to your example.com bucket. By
redirecting requests, you can maintain only one copy of your website content.
Visitors who type www in their browsers and those who specify only the root
domain are routed to the same website content in your example.com bucket. 

Step 2.2: Configure Buckets for Website Hosting


When you configure a bucket for website hosting, you can access the website using the
Amazon S3 assigned bucket website endpoint.
In this step, you configure both buckets for website hosting. First, you configure
example.com as a website and then you configure www.example.com to redirect all
requests to the example.com bucket.
To configure your buckets for website hosting
1. Sign in to the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the name of the bucket that you want to enable
static website hosting for.
3. Choose Properties.
4. Choose Static website hosting.
5. Configure the example.com bucket for website hosting. In the Index Document
box, type the name that you gave your index page.

54
6. Choose Save.

Step 2.3: Configure Your Website Redirect

Now that you have configured your bucket for website hosting, configure the
www.example.com bucket to redirect all requests for www.example.com to example.com.

To redirect requests from www.example.com to example.com

1. In the Amazon S3 console, in the Buckets list, choose your bucket


( www.example.com, in this example).
2. Choose Properties.
3. Choose Static website hosting.
4. Choose Redirect requests. In the Target bucket or domain box, type
example.com.
5. Choose Save.

55
Step 2.4: Configure Logging for Website Traffic

Optionally, you can configure logging to track the number of visitors accessing
your website. To do that, you enable logging for the root domain bucket.

Step 2.5: Test Your Endpoint and Redirect

To test the website, type the URL of the endpoint in your browser. Your request is
redirected, and the browser displays the index document for example.com.
In the next step, you use Amazon Route 53 to enable customers to use all of the
URLs to navigate to your site.

Step 3: Add Alias Records for example.com and www.example.com

In this step, you create the alias records that you add to the hosted zone for your
domain maps example.com and www.example.com to the corresponding S3
buckets. Instead of using IP addresses, the alias records use the Amazon S3
website endpoints. Amazon Route 53 maintains a mapping between the alias
records and the IP addresses where the Amazon S3 buckets reside.
To route traffic to your website
1. Open the Route 53 console at https://console.aws.amazon.com/route53/.
Note
If you don’t already use Amazon Route 53, you can get started here. After you
have completed your set up, you can resume the instructions below.
2. In the list of hosted zones, choose the name of your domain.

56
3. Choose Create Record Set.
Note
Each record contains information about how you want to route traffic for one
domain (example.com) or subdomain (www.example.com). Records are stored in
the hosted zone for your domain.
4. Specify the following values:
Name
For the first record that you'll create, accept the default value, which is the name of your
hosted zone and your domain. This will route internet traffic to the bucket that has the
same name as your domain.
Repeat this step to create a second record for your subdomain. For the second record,
type www. This will route internet traffic to the www.example.com bucket.
Type
Choose A – IPv4 address.
Alias
Choose Yes.
Alias Target
Type the name of your Amazon S3 bucket endpoint, for example example.com (s3-
website-us-west-2).
Note
You specify the same value for Alias Target for both records. Route 53 figures
out which bucket to route traffic to based on the name of the record.
Routing Policy
Accept the default value of Simple.
Evaluate Target Health
Accept the default value of No.
5. Choose Create.
6. For www.example.com, repeat steps 3 through 5 to create a record.
The following screenshot shows the alias record for example.com as an
illustration. You also need to create an alias record for www.example.com.

Step 4: Testing
57
To verify that the website is working correctly, in your browser, try the following URLs:
● http://example.com – Displays the index document in the example.com bucket.
● http://www.example.com – Redirects your request to http://example.com.
In some cases, you might need to clear the cache of your web browser to see the expected
behaviour.

58
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7
Experiment No. 8

Objective: DNS setup in the Route53 in Amazon AWS for a specific domain.

Requirement: Internet

THEORY:

Configuring Amazon Route 53 as Your DNS Service

You can use Amazon Route 53 as the DNS service for your domain, such as
example.com. When Route 53 is your DNS service, it routes internet traffic to your
website by translating friendly domain names like www.example.com into numeric IP
addresses, like 192.0.2.1, that computers use to connect to each other. When someone
types your domain name in a browser or sends you an email, a DNS query is forwarded
to Route 53, which responds with the appropriate value. For example, Route 53 might
respond with the IP address for the web server for example.com.

In this chapter, we explain how to configure Route 53 to route your internet traffic to the
right places. We also explain how to migrate DNS service to Route 53 if you're currently
using another DNS service, and how to use Route 53 as the DNS service for a new
domain.

When you register a domain with Route 53, we automatically make Route 53 the DNS
service for the domain. Route 53 creates a hosted zone that has the same name as the
domain, assigns four name servers to the hosted zone, and updates the domain to use
those name servers.

To specify how you want Route 53 to route internet traffic for the domain, you create
records in the hosted zone. For example, if you want to route requests for example.com to
a web server that's running on an Amazon EC2 instance, you create a record in the
example.com hosted zone, and you specify the Elastic IP address for the EC2 instance.
For more information, see the following topics:

When you register a domain with Route 53, we automatically make Route 53 the DNS
service for the domain. Route 53 creates a hosted zone that has the same name as the
domain, assigns four name servers to the hosted zone, and updates the domain to use
those name servers.

To specify how you want Route 53 to route internet traffic for the domain, you create
records in the hosted zone. For example, if you want to route requests for example.com to

59
a web server that's running on an Amazon EC2 instance, you create a record in the
example.com hosted zone, and you specify the Elastic IP address for the EC2 instance.

60
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7
Experiment No. 9

Objective: Connect to the server using any FTP Client (Ex: FileZilla) and update the
website content.

Requirement: Internet

THEORY:
Before you can login with SFTP, you need to activate SFTP or SSH access in your
One.com control panel.

1. Open FileZilla
2. Enter the address of the server in the field Host, located in the Quickconnect bar.
- (sftp.example.com - make sure to enter sftp to connect securely via SFTP)
3. Enter your username
- (example.com - keep it lowercase and without "www.")
4. Enter your password
- (the one you chose for SSH in your Control Panel)
5. Enter the port number.
- (port 22 for SFTP)
6. Click on Quick connect or press Enter to connect to the server.
7. Click OK when you get a warning about an unknown host key.

Note: Remember to replace example.com with your own domain.

61
62
CLOUD APPLICATION DEVELOPMENT LAB (4-1 SEM -CSE B)
Date: Roll No: 17R21A05B7

Experiment No. 10

Objective: Deploy a Word Press blog in Amazon AWS

Requirement: Internet

THEORY:
Launch a WordPress Website with Amazon EC2
This step-by-step guide will help you get a website up and running with WordPress*, installed on
an Amazon EC2 virtual machine (also known as an “instance”). You will go through how to
configure and launch an EC2 instance, how to get your WordPress username and password, and
how to log into your WordPress admin portal. Everything done in this tutorial is free-tier eligible.

*Note: This guide results in an architecture for a basic WordPress website intended for
personal use or learning. This tutorial is not recommended for business-level websites with
high scalability needs. For a more advanced tutorial, see the Build a Wordpress Website
Project or Wordpress: Best Practices on AWS.

Quick tip: With Amazon Lightsail you can launch a WordPress website within minutes for
a low, predictable price Jumpstart your website with Amazon Lightsail >>

Launching a WordPress Website with AWS Requires an Account

Create a Free Account in Minutes

Open the AWS Management Console and you can keep this step-by-step guide open. When the
screen loads, enter your user name and password to get started. Then find EC2 under Compute,
and double click to open the dashboard.

63
Step 1: Launch an Amazon EC2 Instance

Now you are in the EC2 dashboard, click Launch Instance from the dashboard to create and
configure your virtual machine.

64
Step 2: Configure your Instance

Now you're in the Amazon EC2 configuration wizard, we will be using an existing Amazon
Machine Image (AMI) from the AWS Marketplace that has WordPress already installed. The
AWS Marketplace provides access to thousands of pre-configured images for common pieces of
software.

a. Click on AWS Marketplace on the left-hand side, search for WordPress, look for WordPress
powered by BitNami, then click Select.

65
b. You will be presented a detailed pricing page. In this case, the price will be $0.00 for the
software regardless of the size of the instance that you use.

Scroll to the bottom and click Continue.

c. For this tutorial, we will be using a free-tier eligible t2.micro instance. Click on t2.micro in
the Type column (it should be the first one), then click Next: Configure Instance Details. It may
take a few seconds to load.

On the following screens, click Next: Add Storage and then Next: Tag Instance.

66
d. We will set a name for your instance in this step. Enter Name in the Key box and WordPress in
the Value box. Click Review and Launch to continue.

. You can review your instance configurations, then click Launch when you’re ready to start your
Amazon EC2 instance running WordPress.

67
 The next screen deals with key-pairs. Key-pairs are how you can connect to your EC2 instances
via a terminal program using Secure Shell (SSH). Select Proceed without a key pair, and check
the box acknowledging that you know you need this key to access your EC2 instance.

Click Launch Instances to launch your instance. Be aware that starting the instance up may take a
few minutes.

Note: To connect to your instance directly, you will need to create a new key pair. For
instructions on creating a key pair and connecting to an instance, see steps 2 d.-2 f. and 3 of the
tutorial: Launch a Linux Virtual Machine.

68
g. Click View Instances on the bottom right of the page (you may need to scroll down to see it).
Then select the WordPress instance, make sure the Instance State says running. If Instance State
says launching then AWS is still preparing your WordPress instance.

h. Once your instance is running, you can now test your WordPress website. Find the Public
IP for your instance at the bottom of this page.

69
i. Copy the Public IP into a new tab in your web browser, and you should see a Hello World blog
page appear.

Step 3: Make Changes to Your Website

Now that you have your WordPress site up and running, it’s time to log into its administration
page so you can customize your site. To find your password, please follow the steps below:

70
a. Switch back to your EC2 management console in your web browser.
Select WordPress instance, and click the Actions button. In the drop down menu, select Instance
Setting, and choose Get System Log.

b. In the system log window, scroll through to the bottom to find the password that's surrounded
by hash marks.

c. Now that you have your password, switch back to the tab that you used to access the Word
Press Hello World page. Add /admin to the end of the URL so it looks something
like 54.192.32.144/admin. Hit enter.

Enter the Username user and the Password that you read from the log file.

71
Congratulations! You now have your WordPress site up and running. You can now manage,
customize, and configure it as you like.

72

You might also like