0% found this document useful (0 votes)
30 views42 pages

Practical 2 Aim

Uploaded by

b33177209
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views42 pages

Practical 2 Aim

Uploaded by

b33177209
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

202103103510239 Sujal V.

Kakadiya

Practical 2
Aim : Perform a practical to create the snapshot of virtual machine. Also, demonstrate the
VM cloning and access the virtual machine using SSH and VNC.
To complete the tasks of creating a snapshot of a virtual machine, cloning the VM, and accessing
it using SSH and VNC, follow these steps:
1. Create a Snapshot of a Virtual Machine
Snapshot Creation:
A snapshot is a saved state of a virtual machine (VM) at a specific point in time. It allows you to
revert the VM to this state later, which is useful for backup and testing purposes.
 Using VirtualBox:
Step 1: Open VirtualBox by launching the application from your desktop or applications
menu. In the VirtualBox main window, locate and select the virtual machine (VM) for
which you want to create a snapshot. Make sure the VM is powered off or in a saved state
to ensure the snapshot is accurate.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 13


202103103510239 Sujal V. Kakadiya

Step 2: In the VirtualBox main window, click on the "Snapshots" tab located in the top-right
corner. This will open the Snapshots pane, where you can manage and create snapshots for the
selected virtual machine.

Step 3: Click on the "Take" icon, which is usually represented by a camera or similar symbol, in
the Snapshots pane. Alternatively, you can right-click the selected VM and choose "Take
Snapshot" from the context menu. This action will open a dialog where you can enter a name and
description for the snapshot.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 14


202103103510239 Sujal V. Kakadiya

Step 4: In the dialog that appears, enter a descriptive name for your snapshot to easily identify it
later. Optionally, you can add a brief description to provide more context or details about the
state of the virtual machine at the time of the snapshot. Once you’ve named and described the
snapshot, click "OK" to create it.

Step 5: After naming your snapshot and adding a description, click the "OK" button to finalize
the creation of the snapshot. VirtualBox will then save the current state of the virtual machine as
a snapshot. You will see the new snapshot listed in the Snapshots pane, indicating that the
process is complete.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 15


202103103510239 Sujal V. Kakadiya

2. Demonstrate VM Cloning

VM Cloning:Cloning a VM creates an identical copy of the original virtual machine. This is


useful when you need multiple instances of the same environment.

Using VirtualBox:

Step 1: Open VirtualBox and locate the virtual machine (VM) that you want to clone in the list
of available VMs. Click to select the VM you wish to clone. Ensure that the VM is powered off
or in a saved state to facilitate the cloning process.

Step 2: Right-click on the selected VM and choose "Clone" from the context menu. This will
open the Clone Virtual Machine wizard, where you can configure the cloning options.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 16


202103103510239 Sujal V. Kakadiya

Step 3: In the Clone Virtual Machine wizard, enter a name for the new cloned virtual machine.
This name should be distinct from the original VM to help you identify the clone easily.
Optionally, you can add a description to provide more context about the cloned VM. Once
you’ve named the new VM, click "Next" to proceed.

Step 4: In the Clone Virtual Machine wizard, you will need to choose between two cloning
options:

 Full Clone: Select this option if you want to create a completely independent copy of the
virtual machine. A full clone duplicates the entire virtual disk and configuration, meaning
that the new VM will not rely on the original VM’s files. This option is ideal if you want
the cloned VM to be a standalone entity with no link to the original VM, providing more
flexibility and ensuring that changes to the original do not affect the clone.

 Linked Clone: Choose this option if you prefer to create a clone that shares virtual disk
space with the original VM. A linked clone only copies the differences between the
original VM and the new clone, which saves disk space and speeds up the cloning
process. However, the linked clone depends on the original VM’s disk file, meaning that
any modifications to the original VM’s disk can impact the linked clone.

Select the option that best meets your requirements and then proceed by clicking "Next."

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 17


202103103510239 Sujal V. Kakadiya

Step 5: After selecting the desired cloning option (Full clone or Linked clone), click the "Next"
button to review your cloning choices. Ensure that all settings are correct and that you've chosen
the appropriate cloning type. Once you are satisfied with the configuration, click the "Clone"
button to start the cloning process. VirtualBox will create the new VM based on your selections,
which may take some time depending on the size of the original VM and the cloning option
chosen.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 18


202103103510239 Sujal V. Kakadiya

3. Access the Virtual Machine using SSH and VNC


Access via SSH:
SSH (Secure Shell) allows secure remote access to the VM.
Step 1: Ensure that SSH (Secure Shell) is installed and running on your virtual machine (VM).
For a Linux-based VM, you can typically start the SSH service using the following commands:

1. Install SSH Server (if not already installed):

sudo apt-get update


sudo apt-get install openssh-server

This command installs the OpenSSH server package, which allows SSH connections.

2. Start the SSH Service:

sudo service start ssh

This command starts the SSH service.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 19


202103103510239 Sujal V. Kakadiya

Step 2: Find the IP address of your virtual machine (VM) to connect via SSH. You can usually
obtain the IP address by running the following command on the VM:
ip a

This command displays all network interfaces and their associated IP addresses. Look for the
section corresponding to your network interface (e.g., eth0 or ens33). The IP address will
typically be listed under the inet field.

Alternatively, you can use:


Ifconfig

(if ifconfig is installed) to find the IP address under the appropriate network interface section.

Step 3: On your host machine, open a terminal (Linux or macOS) or Command


Prompt/PowerShell (Windows). To connect to your virtual machine (VM) using SSH, use the
following command:

ssh sujal239@127.0.0.1

In this command:

 sujal239 is the username you set up on your VM.


 127.0.0.1 is the IP address of your VM. If you have a different IP address or are using a
different network configuration, replace 127.0.0.1 with the appropriate IP address.

Press Enter, and you may be prompted to enter the password for the specified user. After
authentication, you will have access to your VM’s terminal through the SSH connection.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 20


202103103510239 Sujal V. Kakadiya

Access via VNC:

VNC (Virtual Network Computing) allows you to remotely access the desktop environment of
the VM.

Step 1: Install a VNC server on your virtual machine (VM). For Ubuntu, you can use the
following command to install TightVNC Server:

 sudo apt-get update: Updates the package list to ensure you get the latest version of the
VNC server.
 sudo apt-get install tightvncserver: Installs the TightVNC server package, which
enables remote desktop access.

After installation, you will need to configure the VNC server by setting up a password and
starting the VNC server service.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 21


202103103510239 Sujal V. Kakadiya

Step 2: Start the VNC server on your virtual machine by running the following command:

vncserver

This command initializes the VNC server and creates a new virtual desktop session. The first
time you run it, you’ll be prompted to set a password for VNC access. This password will be
required when you connect to the VM using a VNC client.

Once started, the command will output the display number and address, usually in the format :1,
:2, etc., which indicates the port number you’ll use to connect via VNC. For example, if the
display number is :1, you can connect using port 5901 (e.g., 192.168.1.100:5901).

Step 3: On your host machine, install a VNC client to connect to the VM. You can choose from
several VNC clients, such as:

 RealVNC: https://www.realvnc.com/

Download and install the VNC client of your choice, following the installation instructions
provided by the client’s website.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 22


202103103510239 Sujal V. Kakadiya

Step 4: Install the downloaded VNC client (e.g., RealVNC) on your host machine by following
these steps:

1. Run the Installer: Double-click the downloaded RealVNC installer file to start the
installation process.
2. Follow the Installation Wizard: Click "Next" on the initial welcome screen of the
installation wizard.
3. Accept the License Agreement: Read and accept the license agreement by selecting the
appropriate option and clicking "Next."
4. Choose Installation Type: Select the installation type if prompted (e.g., Typical or
Custom) and click "Next."
5. Select Installation Location: Choose the destination folder where you want RealVNC to
be installed or accept the default location. Click "Next."
6. Confirm Installation Settings: Review your installation settings and click "Install" to
begin the installation.
7. Complete Installation: Wait for the installation to finish. Click "Finish" to exit the
installer and launch RealVNC.

You can now configure RealVNC to connect to your virtual machine.

Step 6: Open your VNC client application on your host machine. In the connection dialog, enter
the IP address of your virtual machine (VM) followed by the display number provided by the
VNC server. For example, if the IP address of your VM is 127.0.0.1 and the display number is
:2, you should enter 127.0.0.1:2 into the VNC client’s address field. This format combines the
VM’s IP address with the port number derived from the display number. Click "Connect" to
initiate the connection to your VM’s desktop environment.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 23


202103103510239 Sujal V. Kakadiya

Step 7: If prompted by the VNC client, enter the VNC password that you set up when
configuring the VNC server on your virtual machine. This password is required to authenticate
and establish a secure connection. After entering the correct password, you will gain access to
the VM's desktop environment, allowing you to interact with it remotely as if you were directly
in front of the VM.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 24


202103103510239 Sujal V. Kakadiya

Step 8: You can now access and interact with the virtual machine from your host machine using
the VNC Viewer. With the VNC connection established, you will see the VM’s desktop
environment on your screen. You can perform tasks, manage files, and run applications on the
VM as if you were working directly on it. This remote access allows you to control the VM
conveniently from your location.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 25


202103103510239 Sujal V. Kakadiya

Practical 3

Aim : Perform a practical to configure EC2 compute service using AWS and connect to
the EC2 instance using RDP.

Objective: The goal of this practical is to set up an Amazon Elastic Compute Cloud (EC2)
instance on AWS (Amazon Web Services) and then connect to this instance using Remote
Desktop Protocol (RDP). EC2 is a scalable compute capacity service that allows you to run
virtual servers in the cloud. RDP is a protocol used to remotely access the graphical desktop of a
Windows-based machine.

Details:

1. Amazon EC2 (Elastic Compute Cloud):


o Definition: EC2 is a web service that provides resizable compute capacity in the
cloud. It allows users to run virtual machines, known as instances, on-demand.
You can select different types of instances based on your needs, such as compute-
optimized, memory-optimized, or storage-optimized instances.
o Features: EC2 provides flexibility in choosing instance types, storage options,
and networking configurations. It also supports scaling up or down based on
application requirements.

2. RDP (Remote Desktop Protocol):


o Definition: RDP is a protocol developed by Microsoft that allows users to
remotely access and control a Windows-based computer or server. It provides a
graphical interface and full desktop access over the network.
o Use Case: RDP is commonly used to manage Windows servers and desktops
remotely, providing users with the ability to work on their remote machines as if
they were local.

Practical Steps:

1. Configure EC2 Instance:


o Launch an EC2 instance from the AWS Management Console.
o Choose the appropriate instance type, operating system (e.g., Windows), and
configure the instance settings such as security groups, key pairs, and storage.

2. Connect to EC2 Instance Using RDP:


o Obtain the public IP address or DNS name of the EC2 instance.
o Use an RDP client to connect to the instance, entering the required credentials and
IP address.
o Access the Windows desktop environment of the EC2 instance remotely.

This practical helps users understand how to leverage cloud computing resources and manage
them effectively using remote access tools.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 26


202103103510239 Sujal V. Kakadiya

Step 1: Log in to the AWS Management Console. Navigate to the EC2 dashboard by selecting
"EC2" from the list of services. This will open the EC2 console, where you can manage and
configure your virtual machines, known as EC2 instances.

Step 2: In the EC2 dashboard, click on the "Launch Instance" button. This action initiates the
process of creating a new EC2 instance. You will be guided through a series of steps to configure
and launch your instance.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 27


202103103510239 Sujal V. Kakadiya

Step 3: In the "Name and Tags" tab of the instance configuration, enter a name for your instance
in the "Name" field. For this example, type sujal as the instance name. Adding a name helps you
easily identify and manage your instance within the AWS console. Optionally, you can add tags
to further categorize or organize your instance, but for this step, focusing on the name is
sufficient.

Step 4: In the "Amazon Machine Image (AMI)" selection screen, choose an AMI that provides
the operating system you want to use. For this practical, select a Microsoft Windows AMI that is
marked as "Free Tier Eligible" to ensure it is within the free usage tier limits. This choice allows
you to run a Windows-based instance without incurring additional costs, provided you stay
within the free tier’s usage limits.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 28


202103103510239 Sujal V. Kakadiya

Step 5: In the "Choose Instance Type" screen, select the instance type that suits your needs. For
this practical, choose t2.micro, which is marked as "Free Tier Eligible." This instance type offers
a small amount of computing resources and is covered under the AWS Free Tier, making it ideal
for testing and low-cost usage. Click "Next" to proceed with the instance configuration.

Step 6: In the "Configure Security Group" section, create a new key pair to securely access your
EC2 instance. Enter the name "Sujal239" for the key pair in the appropriate field. Choose "RSA"
as the key pair type, and select .pem as the format for the private key. Click "Create Key Pair" to
generate the key pair. Download and save the .pem file securely, as it is required for accessing
your instance via SSH.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 29


202103103510239 Sujal V. Kakadiya

Step 7: After configuring the key pair and any additional settings, click the "Launch Instance"
button. This action initiates the creation of your EC2 instance based on the configurations you
selected. You will see a confirmation message indicating that your instance is being launched.
Once the instance is up and running, you can manage it from the EC2 dashboard.

Step 8: Wait for a few moments while AWS provisions and launches your EC2 instance. This
process may take a few minutes as AWS sets up the instance with the configurations you
specified. You can monitor the progress on the EC2 dashboard where the instance status will
update from "pending" to "running" once the setup is complete.

Step 9: In the EC2 dashboard, navigate to the "Instances" section and locate your newly
launched instance. Click on the checkbox next to the instance to select it. Then, click the
"Connect" button at the top of the page.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 30


202103103510239 Sujal V. Kakadiya

Step 10: After clicking the "Connect" button, a new dialog box will open. This dialog will
present you with three connection options for accessing your EC2 instance:

1. EC2 Instance Connect: A browser-based method for connecting to your instance


without needing to manage SSH keys. This option is generally used for Linux instances
and allows direct access from the AWS Management Console.
2. Session Manager: This option allows you to connect to your instance using AWS
Systems Manager without requiring an SSH client. It provides a secure way to manage
your instances without opening inbound ports.
3. RDP Client: For Windows instances, this option provides details on how to connect
using Remote Desktop Protocol (RDP). You will typically need to download the RDP file
and use it with an RDP client to access the Windows desktop environment of your
instance.

Step 11: In the "Connect to Instance" dialog, select the "RDP Client" tab to access the
connection details for Windows instances. Click on the "Download Remote Desktop File"
button. This will download a .rdp file, such as Sujal.rdp, to your local machine. This file contains
the necessary configuration to connect to your EC2 instance using Remote Desktop Protocol.
Save this file securely, as it will be used to access your Windows desktop environment on the
EC2 instance.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 31


202103103510239 Sujal V. Kakadiya

Step 12: The .rdp file, such as Sujal.rdp, will be downloaded to your local machine. This file is
used to initiate a remote desktop connection to your EC2 instance. Locate the downloaded .rdp
file on your computer and double-click it to open it with your default Remote Desktop client.
This will start the process of connecting to your EC2 instance's desktop environment.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 32


202103103510239 Sujal V. Kakadiya

Step 13: In the "Connect to Instance" dialog, click on the "Get Windows Password" button. You
will be prompted to upload the private key file that you previously downloaded and saved (e.g.,
Sujal239.pem). Click "Browse" or "Choose File" to locate and upload the private key file from
your local.

Step 14: After uploading the private key file, click on the "Decrypt Password" button. This
action will process the private key and reveal the Windows administrator password for your EC2
instance. Make sure to securely store or copy this password, as it will be required to log in to
your instance using Remote Desktop.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 33


202103103510239 Sujal V. Kakadiya

Step 15: Copy the newly decrypted Windows administrator password. Next, locate and double-
click the .rdp file (e.g., Sujal.rdp) you previously downloaded to launch the Remote Desktop
client.

In the Remote Desktop connection window that opens, click on "Connect." You will be
prompted to enter the username and password. Enter the username (typically Administrator) and
paste the copied password.

Click "OK" or "Connect" to establish a remote desktop session with your EC2 instance.

Step 16: In the Remote Desktop connection window, you will be prompted to enter the
password. Paste the copied Windows administrator password into the password field. Click
"OK" to proceed.
This action will authenticate your connection attempt and establish a remote desktop session
with your EC2 instance. You should now be able to interact with the Windows desktop
environment of your EC2 instance as if you were directly in front of it.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 34


202103103510239 Sujal V. Kakadiya

Step 17: A new prompt will appear, stating, "The identity of the remote computer cannot be
verified. Do you want to connect anyway?" This message appears because the remote desktop
client is unable to verify the identity of the EC2 instance.

Click "Yes" to proceed with the connection. This action will bypass the warning and allow you
to establish a remote desktop session with your EC2 instance.

Step 18: The Remote Desktop client will display a "Connecting" window, indicating that it is
establishing a connection to your EC2 instance. This process may take a few moments as the
client negotiates the connection and authenticates with the instance.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 35


202103103510239 Sujal V. Kakadiya

Step 19: Once the connection is established, a new window will open displaying the Windows
operating system environment of your EC2 instance. This window allows you to interact with the
cloud-based Windows OS as if you were working on a physical machine. You can now use the
instance to run applications, manage files, and perform any tasks you need, taking full advantage
of the remote desktop capabilities provided by the EC2 instance.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 36


202103103510239 Sujal V. Kakadiya

Practical 4

Aim : Perform a practical to configure S3 service using AWS and configure


access policies for the S3 bucket.

Objective:

The goal is to learn how to create an S3 bucket, store data in it, and apply access policies that
control who can read, write, or modify the content. Amazon S3 is a scalable object storage
service that allows for secure storage, retrieval, and sharing of large amounts of data over the
cloud.

Details:

1. Amazon S3 (Simple Storage Service):

 Definition: S3 is a cloud-based object storage service that provides secure, durable, and
scalable storage for data. It is primarily used for backup, archiving, and data distribution.
 Features:
o Scalability: S3 automatically scales to accommodate the amount of data you
store.
o Durability & Availability: Offers high durability (99.999999999%) and
availability (99.99% uptime).
o Security: Provides access control via policies and permissions, encryption, and
monitoring tools.

2. Access Policies:

 Definition: Access policies define who can access the S3 bucket and what actions they
can perform. These policies are written in JSON and determine permissions such as
reading, writing, and deleting objects in the bucket.
 Types of Access Policies:
o Bucket Policies: Used to apply permissions at the bucket level for multiple users
or services.
o IAM Policies: Manage access for individual AWS users or roles.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 37


202103103510239 Sujal V. Kakadiya

Step 1: Create your first S3 bucket

After you sign up for AWS, you're ready to create a bucket in Amazon S3 using the AWS
Management Console. Every object in Amazon S3 is stored in a bucket. Before you can store
data in Amazon S3, you must create a bucket.

1. Choose Create bucket. The Create bucket page opens.


2. In Bucket name, enter a DNS-compliant name for your bucket.

The bucket name must:


• Be unique across all of Amazon S3.
• Be between 3 and 63 characters long.
• Not contain uppercase characters.
• Start with a lowercase letter or number.

After you create the bucket, you can't change its name.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 38


202103103510239 Sujal V. Kakadiya

Step 2: In the "Object Ownership" section, control the ownership of objects written to the bucket
from other AWS accounts. This determines who can specify access permissions and manage
objects in the bucket. For this practical, ensure that "Bucket owner enforced" is selected to give
the bucket owner full control over objects.

Step 3: In the "Default Encryption" section, enable server-side encryption to automatically protect new
objects stored in the bucket. Choose between different encryption types such as SSE-S3, SSE-KMS, or
DSSE-KMS based on your security needs. For cost optimization, enable the S3 Bucket Key option with
SSE-KMS to reduce encryption-related charges Then Click on Create bucket.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 39


202103103510239 Sujal V. Kakadiya

Step 4: After creating a bucket in Amazon S3, you're ready to upload an object to the
bucket. An object can be any kind of file: a text file, a photo, a video, and so on.

To upload an object to a bucket


1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/.
2. In the Buckets list, choose the name of the bucket that you want to
upload your object to.

3. On the Objects tab for your bucket, choose Upload.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 40


202103103510239 Sujal V. Kakadiya

4. Under Files and folders, choose Add files.


5. Choose a file to upload, and then choose Open.
6. Choose Upload.

You've successfully uploaded an object to your bucket.

Step 5: To download an object from an S3 bucket

1. In the Buckets list, choose the name of the bucket that you want to download an
object from.

• Choose the name of the object that you want to download.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 41


202103103510239 Sujal V. Kakadiya

You've successfully downloaded your object.

Copy your object to a folder

1. In the Buckets list, choose your bucket name.

2. Choose Create folder and configure a new folder:


a. Enter a folder name (for example, favorite-pics).
b. For the folder encryption setting, choose None.
c. Choose Save.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 42


202103103510239 Sujal V. Kakadiya

3. Navigate to the Amazon S3 bucket or folder that contains the objects that you want to copy.

4. Select the check box to the left of the names of the objects that you want to copy.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 43


202103103510239 Sujal V. Kakadiya

5. Choose Actions and choose Copy from the list of options that appears. Alternatively, choose
Copy from the options in the upper right.

6. Choose the destination folder:


a. Choose Browse S3.

b. Choose the Radio button to the left of the folder name and click on Choose destination.

The path to your destination folder appears in the Destination box. In Destination, you can
alternately enter your destination path, for example, s3://bucket-name/folder-name/.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 44


202103103510239 Sujal V. Kakadiya

7. In the bottom right, choose Copy.

Doing access control

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 45


202103103510239 Sujal V. Kakadiya

Delete your objects and bucket

Before you delete your bucket, empty the bucket or delete the objects in the bucket. After you
delete your objects and bucket, they are no longer available. However, another AWS account
might create a bucket with the same name before you have a chance to reuse it.

1. In the Buckets list, choose your bucket name and open it.
2. Now select objects which you want to delete.

3. Click on delete button from the control bar.


4. Verify Your action and click on Delete objects.

5. Success Msg.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 46


202103103510239 Sujal V. Kakadiya

Practical 5

Aim : Perform a practical to configure AWS cloud front and elastic beanstalk
services in AWS.

Objective:

The goal is to set up Amazon CloudFront for content delivery and Elastic Beanstalk for
deploying and managing applications in the AWS cloud.

Details:

1. AWS CloudFront:

 Definition: CloudFront is a content delivery network (CDN) service that delivers web
content, such as images, videos, and other assets, to users from the nearest edge location,
reducing latency.
 Features:
o Low latency and high transfer speed.
o Global content caching and distribution.
o Supports static and dynamic content delivery, live streaming, and security with
SSL/TLS encryption.

2. AWS Elastic Beanstalk:

 Definition: Elastic Beanstalk is a platform-as-a-service (PaaS) offering that simplifies


application deployment and management. You can deploy web applications written in
various languages (e.g., Python, Node.js, Java) without managing the underlying
infrastructure.
 Features:
o Automatic scaling, monitoring, and load balancing.
o Supports a wide variety of programming languages and frameworks.
o Provides health monitoring and integration with AWS services like RDS and S3.

Create a CloudFront Distribution

Step 1: Navigate to CloudFront: Search for "CloudFront" in the search bar or find it under
"Networking & Content Delivery".

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 47


202103103510239 Sujal V. Kakadiya

Step 2: Create a Distribution: Click "Create Distribution".

Upload any html file to the bucket we have created before and this file will be used later.

Configure Origins:

Origin Domain Name: Enter the DNS name of your Elastic Beanstalk
environment's load balancer (e.g., your-environment-name.us-east
elasticbeanstalk.com)

Origin Path: Leave this blank if your Elastic Beanstalk environment is


configured to serve content from the root.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 48


202103103510239 Sujal V. Kakadiya

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 49


202103103510239 Sujal V. Kakadiya

Default Cache Behavior:

• Viewer Protocol Policy: Choose "HTTPS only" for secure connections.


• Cache Policy: Select "Default Cache Behavior" or create a custom policy if needed.
• Compress Objects: Enable compression for better performance.

Distribution Settings:

• Price Class: Choose the price class that suits your needs (e.g., "Standard").
• Origin Shield: Enable Origin Shield for additional protection.
• Default TTL: Set the default time to live (TTL) for cached content.

Distribution Settings:

• Viewer Certificate: If you need HTTPS, configure a certificate.


• Access Identity: If using access controls, set up an identity.

Review and Create: Review your settings and click "Create Distribution".

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 50


202103103510239 Sujal V. Kakadiya

Step 2 : To edit the bucket policy, navigate to the S3 console and select the desired bucket. Go to
the "Permissions" tab and find the option for "Bucket Policy" to make the necessary changes.

Step 3: After selecting the Bucket Policy option, click on the Edit button. Paste the policy you
recently copied from CloudFront into the provided policy editor. Review the changes to ensure
accuracy, then click Save Changes to apply the updated policy to the S3 bucket.

Step 4: Open the AWS Management Console and use the search bar to find and select Elastic
Beanstalk. This will take you to the service's dashboard, where you can manage your application
environments.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 51


202103103510239 Sujal V. Kakadiya

Step 5: Navigate to the CloudFront service from the AWS Management Console. Go to the
Distributions section, locate the distribution you need, and copy the Distribution Name for
further use.

Step 6: In Elastic Beanstalk, select Create New Application. Provide a unique Name for your
application and configure the necessary settings. Once completed, proceed to create the
application environment.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 52


202103103510239 Sujal V. Kakadiya

Step 7: Select the desired Platform for your application based on your project's requirements.
Configure other necessary details, such as instance type, scaling options, and environment
variables, to tailor the application settings to your specific use case. Ensure all selections align
with your intended deployment goals before proceeding,then click create.

Step 8: On the Configure Service Access page, select the option to Create a new service role.
Fill in the required information, such as the role name and permissions, to grant Elastic
Beanstalk the necessary access to AWS resources. Once all required fields are completed, click
Next to proceed to the next configuration step.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 53


202103103510239 Sujal V. Kakadiya

Step 9: Review all the configuration steps and settings you’ve made throughout the setup
process. Ensure that all details are accurate and meet your requirements. Once you’ve confirmed
everything is correct, click on Submit to finalize the application creation and deploy it to Elastic
Beanstalk.

Step 10: Paste the Distribution Name you copied from CloudFront into the appropriate field in
the application settings. After saving your changes, open a new tab in your browser and paste the
same Distribution Name to view the results of the deployed page. This will allow you to verify
that the application is running correctly.

CGPIT/CE/SEM-6/ CLOUD COMPUTING (CE6002) 54

You might also like