0% found this document useful (0 votes)
80 views

CC Practical File

The document describes setting up an AWS free tier account and configuring an EC2 instance. It outlines the 11 step process to create an AWS account for free tier eligibility and explore AWS services. It then details the 13 step process to launch an EC2 instance, including selecting an AMI, instance type, security group, and storage. The instance is successfully launched and accessed using Putty and PuttyGen to generate a key pair file.
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)
80 views

CC Practical File

The document describes setting up an AWS free tier account and configuring an EC2 instance. It outlines the 11 step process to create an AWS account for free tier eligibility and explore AWS services. It then details the 13 step process to launch an EC2 instance, including selecting an AMI, instance type, security group, and storage. The instance is successfully launched and accessed using Putty and PuttyGen to generate a key pair file.
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/ 70

Enrollment No.

: 201903103510225

Practical – 1

Aim : Create the AWS free tier account and explore the AWS console.

 Amazon Web Services (AWS) is providing 12 months of Free Tier account to new
subscribers to get hands-on experience with all the AWS cloud services. The AWS Free Tier is
mainly designed to give hands-on experience with AWS Cloud Services for customers free of
cost for a year. With the AWS Free Tier account, all the services offered have a limit on what we
can use without being charged.

 Steps to create AWS free tier account :

1 : First Open your web browser and navigate to AWS Free Tier Page

2 : On middle-click on Create a Free Account

Fig. 1.1 AWS website

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3 : Issue the details which you want to use for login your AWS account and click on Continue

Fig. 1.2 Sign up details to create ccount

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

4 : Contact Information

Select your AWS type (Profesional/ Personal) Fill in the correct information to validate your
account if you’re going to create personal use then click on “Personal Account” else use
“Company Account”, Accepts the Terms and
condition and then click on Create Account and Continue

Fig. 1.3 User details

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5 : Payment and PAN information: In this step, you must fill in your credit card /Debit Card info
and billing address and click on Secure Submit.

Fig. 1.4 Payment details page

6 : After payment process phone verification is there. In this otp will be sent to given mobile
number.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7 : Support plan: AWS support offers a selection of plans to meet your business needs.
Select your suitable plan then click continue.

Fig. 1.5 Select plan for AWS account

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

8 : Now your AWS free tier account is ready to use. Go to sing in to console and add login email
id and password.

Fig. 1.6 AWS Sign in page

 Now we can explore services of AWS.

Fig. 1.7 After Successful Sign in

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Fig. 1.8 Different services of AWS

 There are many services are there in AWS some of that are :

1. Amazon EC2 [Elastic Compute Cloud]

Amazon EC2 is one of the fastest-growing cloud computing AWS services, which offers virtual
servers to manage any kind of workload. It facilitates the computing infrastructure with the best
suitable processors, networking facilities, and storage systems. As a result, it supports adapting
to the workloads precisely. Amazon EC2 provides a highly secure, reliable, performing
computing infrastructure meeting business demands. And, it helps you to access resources
quickly and dynamically scale capacities as per demands.

2. Amazon S3

Another popular addition to the AWS services list is Amazon S3, which is an object storage
AWS service, which is highly scalable. It mainly helps users to access any quantity of data from
anywhere. Here, data is stored in ‘storage classes’ to reduce costs without any extra investment
and manage it comfortably. The data is highly secured and supports meeting audit and
compliance requirements. You can handle any volume of data with Amazon S3’s robust access

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

controls, replication tools, and higher visibility. Moreover, it supports maintaining data version
controls and preventing accidental deletion.

3. Amazon RDS

Amazon RDS would be the next entry in this discussion on AWS services. Amazon RDS is the
managed Relational Database AWS Service (RDS) for MySQL, PostgreSQL, Oracle, SQL
Server, and MariaDB. It allows the setup, operation, and scale of a relational database in the
cloud quickly. Also, it achieves high performance by automating the tasks such as hardware
provisioning, database setup, patching, and backups. When you use Amazon RDS, you don’t
need to install and maintain the database software. Overall, you can optimize costs by embracing
this service and achieve high availability, security, and compatibility for your resources.

4. Amazon VPC

Amazon VPC is the Virtual Private Cloud, which is an isolated cloud resource. It controls the
virtual networking environment, such as resource placement, connectivity, and security. And it
allows you to build and manage compatible VPC networks across cloud AWS resources and on-
premise resources. Here, it improves security by applying rules for inbound and outbound
connections. Also, it monitors VPC flow logs delivered to Amazon S3 and Amazon Cloudwatch
to gain visibility over network dependencies and traffic patterns. Amazon VPC also detects
anomalies in the patterns, prevents data leakage, and troubleshoots network connectivity and
configuration issues.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 2

Aim : Perform a practical to configure an EC2 instance in AWS.

 Amazon Elastic Compute Cloud (Amazon EC2) is a web-based service that allows businesses
to run application programs in the Amazon Web Services (AWS) public cloud. Amazon EC2
allows a developer to spin up virtual machines (VMs), which provide compute capacity for IT
projects and cloud workloads that run with global AWS data centers.

 An AWS user can increase or decrease instance capacity as needed within minutes using the
Amazon EC2 web interface or an application programming interface (API). A developer can
code an application to scale instances automatically with AWS Auto Scaling. A developer can
also define an autoscaling policy and group to manage multiple instances at once.

How EC2 works :


 To begin using EC2, developers sign up for an account at Amazon's AWS website. They can
then use the AWS Management Console, the AWS Command Line Tools (CLI), or AWS
Software Developer Kits (SDKs) to manage EC2.

 A developer then chooses EC2 from the AWS Services dashboard and 'launch instance' in the
EC2 console. At this point, they select either an Amazon Machine Image (AMI) template or
create an AMI containing an operating system, application programs, and configuration settings.
The AMI is then uploaded to the Amazon S3 and registered with Amazon EC2, creating an AMI
identifier. Once this has been done, the subscriber can requisition virtual machines on an as-
needed basis.

 Data only remains on an EC2 instance while it is running, but a developer can use an Amazon
Elastic Block Store volume for an extra level of durability and Amazon S3 for EC2 data backup.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

1 : Open the Amazon EC2 console after login on AWS.

Fig. 2.1 Amazon EC2 Service

2 : Choose Launch Instance.

Fig. 2.2 Amazon EC2 Service

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3 : Click on the top right corner button name “opt out to the old experience”

Fig. 2.3 After Click on ‘launch instance’ button

4 : select Amazon linux which is free tier eligible and click on next button.

Fig. 2.4 Step 1 After click on button name “opt out to the old experience”

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5 : Choose the instance type and click on next button

Fig. 2.5 Step 2 to create instance

6 : Configure instance and click on next button

Fig. 2.6 Step 3 to create instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7 : Add storage – in this step simply click on next button

Fig. 2.7 Step 4 to create instance

8 : Add tag – in this step click on next button

Fig. 2.8 Step 5 to create instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

9 : Configure Security group – Add required rule in this step

Fig. 2.9 Step 6 to create instance

10 : Click on “Launch” button

Fig. 2.10 Step 7 to create instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

11 : Select the check box for the key pair that you created, and then choose Launch Instances.

Fig. 2.11 After Click on ‘Launch’ button

Now instance is created successfully

Fig. 2.12 After generating key pair

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

After click on ‘view instance’ button

Fig. 2.13 Successful creation of ec2 instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 To access the instance we need putty and puttygen in windows system.

 Putty key generator is use to generate .ppk file of our key.

Fig. 2.14 Puttygen to generate .ppk file

 In putty give the public ip of instance and click on open button.

Fig. 2.15 Putty to access ec2 instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 After click on open button one terminal will be open.

Fig. 2.16 After click on ‘open’ button on putty

 Now write “ec2-user” and press enter. Now our we are on our instance. To check that write
command “pwd” and press ok then path will be shown.

Fig. 2.17 Successful Access to ec2 instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 3

Aim : Implementation of AWS identity and access management services.

 AWS Identity and Access Management (IAM) is a web service that helps you securely
control access to AWS resources. You use IAM to control who is authenticated (signed in) and
authorized (has permissions) to use resources.

IAM gives you the following features:

 Shared access to your AWS account


 Granular permissions
 Secure access to AWS resources for applications that run on Amazon EC2
 Multi-factor authentication (MFA)
 Identity federation
 Identity information for assurance
 PCI DSS Compliance
 Integrated with many AWS services

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 Steps to create users :

1 : Login into AWS account and search for IAM service.

Fig. 3.1 AWS IAM service


2 : Go to users in IAM service and click on ‘Add users’ button.

Fig. 3.2 Users in IAM Service

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3 : Add users name for each user and password and then click on ‘next’ button.

Fig. 3.3 step 1 to create users


4 : Add policy for users.

Fig. 3.4 step 2 to create users

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5 : Add tag page is shown simply click on ‘next’ button.

Fig. 3.5 step 3 to create users

6 : In this page users details is shown. Click on ‘Create user’ button.

Fig. 3.6 step 4 to create users

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7 : Users created successfully. Now Click on ‘close’ button.

Fig. 3.7 Users created successfully

8 : After creating users click on any user then user details will be shown.

Fig. 3.8 user details of ‘aniket’

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

9 : Now open AWS sing in page in another window and choose IAM user and fill login details.

Fig. 3.9 Sing in page for IAM user

 Now we can access AWS services which is allow to accessible.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 Steps to create group of user :

1 : Go to user groups in IAM service and click on ‘create group’ button.

Fig. 3.10 User groups in IAM service

2 : Add the name of group ans select users for that group.

Fig. 3.11 Step 1 to create user group

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3 : Add the policies for that group and click on ‘create’ button.

Fig. 3.12 Step 2 to create user group

 Now user group is created. Using that we can give same access to multiple users.

Fig. 3.13 User group created successfully

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 4

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


access policies for the S3 bucket.

 Amazon Simple Storage Service (Amazon S3) is an object storage service that offers
industry-leading scalability, data availability, security, and performance. Customers of all sizes
and industries can use Amazon S3 to store and protect any amount of data for a range of use
cases, such as data lakes, websites, mobile applications, backup and restore, archive, enterprise
applications, IoT devices, and big data analytics. Amazon S3 provides management features so
that you can optimize, organize, and configure access to your data to meet your specific business,
organizational, and compliance requirements.

Features of Amazon S3 :

 Storage classes
 Storage management
 Access management
 Data processing
 Storage logging and monitoring
 Analytics and insights
 Strong consistency

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 Steps for AWS S3 service :

1. Go to AWS S3 service :

Fig. 4.1 AWS S3 Service

2. Click on ‘create bucket’ button.

Fig. 4.2 AWS S3 Service

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3. Enter name of bucket and enable ACLs.

Fig. 4.3 Enter name of bucket

4. Keep all things as it is and click on ‘create bucket’ button.

Fig. 4.4 Creation of bucket

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5. Now bucket is created successfully now click on that bucket.

Fig. 4.5 Bucket created successfully

6. Now click on upload button.

Fig. 4.6 ‘ank1’ bucket

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7. Click on add file and upload any file.

Fig. 4.7 Upload page to upload file

8. File uploaded successfully now click on that file.

Fig. 4.8 File uploaded successfully

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

9. Now one url is given for this file copy this url link and open it in new window.

Fig. 4.9 ‘mypage1.html’ file

10. Here some error is shown like ‘Access Denied’.

Fig. 4.10 Open file in another window using url

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

11. Now go to permission of bucket and click on ‘Edit’ button of bucket public access.

Fig. 4.11 Permissions page or bucket

12. Now uncheck ‘Block all public access’ and click on ‘save’ button.

Fig. 4.12 Edit Block public access (bucket settings)

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

13. Now block all public access is off.

Fig. 4.13 block all public access is off

14. Now select uploaded file and go to action in that go to ‘Make public using ACL’.

Fig. 4.14 Make public using ACL

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

15. Click on ‘make public’ button.

Fig. 4.15 Make public

16. After making public refresh the object page. Now it will work.

Fig. 4.16 Uploaded file object url

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 Steps to host static page :

1. Go to the properties of bucket.

Fig. 4.17 properties of bucket

2. Go to ‘Static website hosting’ and click on ‘Edit’ button.

Fig. 4.18 Static website hosting

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3. Now enable static website hosting and give default page and error page name.

Fig. 4.19 Edit static website hosting

4. Now upload index.html and error,html page.

Fig. 4.20 File upload page

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5. Make both file to public.

Fig. 4.21 Make public

6. In the static website hosting property one url will be generated open that in another window.
Now our website is hosted.

Fig. 4.22 Static website hosted

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7. To check error page rename the index.html file and refresh the url.

Fig. 4.23 rename index.html file name

8. After refreshing url link page now error.html is shown.

Fig. 4.24 error.html page shown

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 5

Aim : Perform a practical to create VPC in AWS.

 VPC stands for Virtual Private Cloud.

 Amazon Virtual Private Cloud (Amazon VPC) provides a logically isolated area of the AWS
cloud where you can launch AWS resources in a virtual network that you define.

 You have complete control over your virtual networking environment, including a selection
of your IP address range, the creation of subnets, and configuration of route tables and network
gateways.

 You can easily customize the network configuration for your Amazon Virtual Private Cloud.
For example, you can create a public-facing subnet for web servers that can access to the internet
and can also place your backend system such as databases or application servers to a private-
facing subnet.

 You can provide multiple layers of security, including security groups and network access
control lists, to help control access to Amazon EC2 instances in each subnet.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Steps to create VPC in AWS:

1. Open VPC service and click on ‘create VPC’ button.1

Fig. 5.1 VPC Service

2. Enter name and IPv4 of VPC.

Fig. 5.2 VPC details

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3. VPC created successfully.

Fig. 5.3 VPC Service

4. Now go to internet gateway and enter name of gateway.

Fig. 5.4 Internet gateway

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5. Attach gateway to VPC.

Fig. 5.5 Attach gateway to VPC

6. Go to subnet and enter details and create subnet.

Fig. 5.6 Subnet creation

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7. Subnet created successfully.

Fig. 5.7 Subnet created

8. Create route table.

Fig. 5.8 Route table

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

9. Route table created successfully.

Fig. 5.9 Route table created successfully

10. Edit routes as shown below.

Fig. 5.10 Edit Routes

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

11. Edit subnet association as given below.

Fig. 5.11 Edit subnet association

12. Now create EC2 instance and in step 3 of creation enter details as shown below.

Fig. 5.12 EC2 instance creation step 3

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

13. Select default VPC security group.

Fig. 5.14 EC2 instance creation step 6

15. Now our VPC instance is created successfully.

Fig. 5.15 VPC instance created successfully

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 6

Aim : Implementation of RDS database in AWS.

 AWS RDS is short for Amazon Relational Database Service. It provides affordable relational
databases in the cloud, that is easy to use.

 Amazon RDS is a Relational Database Cloud Service

 Amazon RDS minimizes relational database management by automation

 Amazon RDS creates multiple instances for high availability and failovers

 Amazon RDS supports PostgreSQL, MySQL, Maria DB, Oracle, SQL Server, and Amazon
Aurora

 Amazon Relational Database Service (RDS) is a managed SQL database service provided by
Amazon Web Services (AWS). Amazon RDS supports an array of database engines to store and
organize data. It also helps in relational database management tasks like data migration, backup,
recovery and patching.

 Amazon RDS facilitates the deployment and maintenance of relational databases in the cloud.
Cloud administrators use Amazon RDS to set up, operate, manage, and scale relational instances
of cloud databases. Amazon RDS itself is not a database; It is a service used to manage relational
databases.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Steps to create RDS service in AWS:

1. Open RDS service in AWS services.

Fig. 6.1 RDS Service

2. Click on ‘Create database’ button.

Fig. 6.2 RDS Service

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3. Select mysql database.

Fig. 6.3 Select mysql database

4. Enter name, id and password for database.

Fig. 6.4 Enter details of database

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5. Allocate storage of database.

Fig. 6.5 Allocate storage of database

6. Give public access.

Fig. 6.6 Give public access

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7. Now database is created successfully.

Fig. 6.7 Database created successfully

8. Now open Mysql workbench to connect database.

Fig. 6.8 Mysql workbench

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

9. Now connect to default port number 3306.

Fig. 6.9 RDS connected successfully to mysql client

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 7

Aim : Perform a practical to create Elastic beanstalk service in AWS.

 AWS Elastic Beanstalk is an AWS managed service for web applications. Elastic beanstalk
is a pre-configured EC2 server that can directly take up your application code and environment
configurations and use it to automatically provision and deploy the required resources within
AWS to run the web application. Unlike EC-2 which is Infrastructure as a service, Elastic
beanstalk is a Platform As A service (PAAS) as it allows users to directly us a pre-configured
server for their application. Of course you can deploy applications without ever having to use
elastic beanstalk but that would mean having to chose the appropriate service from the vast
array of services offered by AWS, manually provisioning these AWS resources and stitching
them up together to form a complete web-application.

 Elastic beanstalk abstracts the underlying configuration work and allows you as a user to
focus on more pressing matters.

 Elastic Beanstalk takes care of the hosting infrastructure, coding language interpreter,
operating system, security, https service and application layer. All you need to worry about is
writing your code.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225
0225

Steps to create Elastic beanstalk service :

1. Go to compute services in which open “Elastic Beanstalk” service.

Fig. 7.1 Elastic Beanstalk Service

2. Click on “Create Application” button.

Fig. 7.2 Elastic Beanstalk Service

CGPIT / CE / SEM-77 / Cloud Computing


Enrollment No. : 201903103510225
0225

3. Enter the name of the application and choose platform of the application and click on ‘create’
button.

Fig. 7.3 Application details for elastic beanstalk

4. After this it will host default php site.

Fig. 7.4 Creation of application in elastic beanstalk

CGPIT / CE / SEM-77 / Cloud Computing


Enrollment No. : 201903103510225
0225

5. Now the our php default application is hosted which will be accessible using given link.

Fig. 7.5 “Ank-env” php application

6. After open that link in new tab it will show like given below.

Fig. 7.6 Default php hosted application

CGPIT / CE / SEM-77 / Cloud Computing


Enrollment No. : 201903103510225
0225

7. Now upload zip file of our php application.

Fig. 7.7 Uploading of our php zip file

8. Now our php application is deployed.

Fig. 7.8 Our application deployed successfully

CGPIT / CE / SEM-77 / Cloud Computing


Enrollment No. : 201903103510225
0225

9. Now open link with updated path.

Fig. 7.9 Index page of php application

10. Open error page of php application.

Fig. 7.1
7.10 Error page of php application

CGPIT / CE / SEM-77 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 8

Aim : Implementation of Lambda service in AWS.

 AWS Lambda is the event-based serverless computing service for the AWS platform.
Event-driven functions are compute events that happen automatically in response to various
inputs known as triggers. This is sometimes called Functions-as-a-Service (FaaS), though the
AWS Lambda ecosystem extends beyond that. More on event-driven functions later.

 Through serverless computing, Lambda lets developers write and execute code without
worrying about administrative tasks.

 Those tasks include booking server resources from a cloud provider, maintaining servers in
optimal condition, scaling RAM, CPU, and memory resources up and down manually,
managing the underlying operating system, or patching security issues.

 AWS takes care of all that and more on your developers’ behalf. That way, they can focus
on writing code that’ll ensure your customers have smooth service delivery. All your
developers need to do is bring your code to AWS to deploy it for the specific use cases you
want to see.

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

 Steps to create lambda service :

1. Go to IAM policy and create policy and name it to test_lambda.

Fig. 8.1 Creation on policy

2. Now go to IAM roles and create role.

Fig. 8.2 Creation on Role

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3. Select “test_lambda” policy in role creation.

Fig. 8.3 Select “test_lambda” policy

4. Now role name “role_labda” is created.

Fig. 8.4 Role created Successfully

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5. Go to lambda in that click on “create function”.

Fig. 8.5 Lambda function

6. Enter name and select role that we created.

Fig. 8.6 Enter name and select role

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7. After creating function change the code and deploy it.

Fig. 8.7 Change code and deploy it

8. Enter key and value for testing.

Fig. 8.8 Enter key and value for testing

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

9. Output of ‘earth’ is ‘MOON’.

Fig. 8.9 Output of ‘earth’

10. Now create EC2 lambda instance.

Fig. 8.10 Launch EC2 lambda instance

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Practical – 9

Aim : Perform a practical to configure load balancing service using AWS.

AWS Elastic Load Balancing (ELB) distributes incoming application traffic automatically across
multiple targets such as containers, EC2 instances, and IP addresses in one or more availability
zones. This distributes and balances how frontend traffic reaches backend servers and increases
the fault tolerance and availability of user applications. AWS load balancing also
monitors registered targets for health and routes distributes traffic accordingly.

AWS Load Balancer Types

There are four AWS load balancer types supported:

 AWS Classic Load Balancer


 AWS Network Load Balancer (NLB)
 AWS Application Load Balancer (ALB)
 AWS Gateway Load Balancer (GLB)

The previous-generation AWS classic type of load balancer is now only recommended where
users have instances running on an EC2-Classic network. For all other users, AWS Classic Load
Balancer features can be replaced by either AWS Network Load Balancer (NLB) or AWS
Application Load Balancer (ALB).

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

Steps to create Load balancing service in AWS:

1. Create two EC2 instance in same subnet.

Fig. 9.1 Creation of EC2 instances

2. After creating EC2 instances go to EC2 load balancer and click on “create balancer”.

Fig. 9.2 Creation of load balancer

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

3. Give the name of the load balancer.

Fig. 9.3 Enter name of a load balancer

4. Select classic load balancer and click on “Create” button.

Fig. 9.4 Create classic load balancer

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

5. Define security group for load balancer.

Fig. 9.5 Assign security group of load balancer

6. Set response timeout and interval.

Fig. 9.6 Set response timeout and interval

CGPIT / CE / SEM-7 / Cloud Computing


Enrollment No. : 201903103510225

7. Select instances.

Fig. 9.7 Select instances

8. Now firstly we are on first instance and after refresh the page we are move to second instance.

Fig. 9.8 First instance is running now

CGPIT / CE / SEM-7 / Cloud Computing

You might also like