Cloud Lab
Cloud Lab
30. Using similar steps to the ones above, add user-2 to the EC2-
Support group.
➔ user-2 should now be part of the EC2-Support group.
31. Using similar steps to the ones above, add user-3 to the EC2-
Admin group.
8
➔ Next, you will sign-in as user-1, who has been hired as your
Amazon S3 storage support staff.
37. Sign-in with :
● IAM user name: user-1
● Password: Lab-Password1
38. In the Services menu, choose S3.
39. Choose the name of the bucket that exists in the account and
browse the contents.
40. In the Services menu, choose EC2.
41. In the left navigation pane, choose Instances.
➔ You will now sign-in as user-2, who has been hired as your
Amazon EC2 support person.
42. Sign user-1 out of the AWS Management Console by completing
the following actions :
➔ At the top of the screen, choose user-1
➔ Choose Sign Out
43. Paste the IAM users sign-in link into your private browser tab's
address bar and press Enter.
➔ Note : This link should be in your text editor.
44. Sign-in with :
● IAM user name: user-2
● Password: Lab-Password2
45. In the Services menu, choose EC2.
46. In the navigation pane on the left, choose Instances.
➔ Select the instance named LabHost.
47. In the Instance state menu above, select Stop instance.
48. In the Stop Instance window, select Stop.
49. Choose the X to close the Failed to stop the instance message.
➔ Next, check if user-2 can access Amazon S3.
50. In the Services, choose S3.
➔ You will see the message You don't have permissions to list
buckets because user-2 does not have permission to access
Amazon S3.
➔ You will now sign-in as user-3, who has been hired as your
Amazon EC2 administrator.
51. Sign user-2 out of the AWS Management Console by completing
the following actions :
➔ At the top of the screen, choose user-2
➔ Choose Sign Out
10
52. Paste the IAM users sign-in link into your private window and
press Enter.
53. Paste the sign-in link into the address bar of your private web
browser tab again. If it is not in your clipboard, retrieve it from the text
editor where you stored it earlier.
54. Sign-in with :
● IAM user name: user-3
● Password: Lab-Password3
55. In the Services menu, choose EC2.
56. In the navigation pane on the left, choose Instances.
➔ As an EC2 Administrator, you should now have permissions to
Stop the Amazon EC2 instance.
➔ Select the instance named LabHost .
57. In the Instance state menu, choose Stop instance.
58. In the Stop instance window, choose Stop.
➔ The instance will enter the stopping state and will shut down.
59. Close your private browser window
11
34. In the search box to the right of Services, search for and choose
EC2 to open the EC2 console.
35. From the Launch instance menu choose Launch instance.
36. Name the instance :
➔ Give it the name Web Server 1
37. Choose an AMI from which to create the instance :
➔ In the list of available Quick Start AMIs, keep the default Amazon
Linux selected.
➔ Also keep the default Amazon Linux 2023 AMI selected.
● The type of Amazon Machine Image (AMI) you choose
determines the Operating System that will run on the EC2
instance that you launch.
38. Choose an Instance type :
➔ In the Instance type panel, keep the default t2.micro selected.
● The Instance Type defines the hardware resources
assigned to the instance.
39. Select the key pair to associate with the instance :
➔ From the Key pair name menu, select vockey
40. Configure the Network settings :
➔ Next to Network settings, choose Edit, then configure :
● Network: lab-vpc
● Subnet: lab-subnet-public2 (not Private!)
● Auto-assign public IP: Enable
16
➔ Next, you will configure the instance to use the Web Security
Group that you created earlier.
● Under Firewall (security groups), choose Select existing
security group.
● For Common security groups, select Web Security Group.
This security group will permit HTTP access to the
instance.
41. In the Configure storage section, keep the default settings.
42. Configure a script to run on the instance when it launches :
➔ At the bottom of the Summary panel on the right side of the
screen choose Launch instance
43. At the bottom of the Summary panel on the right side of the
screen choose Launch instance
➔ You will see a Success message.
44. Choose View all instances
➔ Wait until Web Server 1 shows 2/2 checks passed in the Status
check column.
➔ Select Web Server 1.
45. Copy the Public IPv4 DNS value shown in the Details tab at the
bottom of the page.
46. Open a new web browser tab, paste the Public DNS value and
press Enter.
47. Choose End Lab at the top of this page and then choose Yes to
confirm that you want to end the lab.
48. Choose the X in the top right corner to close the panel.
17
8. In the list of available Quick Start AMIs, keep the default Amazon Linux
AMI selected.
9. Also keep the default Amazon Linux 2023 AMI selected.
➔ An Amazon Machine Image (AMI) provides the information
required to launch an instance, which is a virtual server in the
cloud. An AMI includes :
In
10.the Instance type panel, keep the default t2.micro selected.
19. At the bottom of the Summary panel on the right side of the
screen choose Launch instance
20. Choose View all instances
➔ In the Instances list, select Web Server.
➔ Review the information displayed in the Details tab. It includes
information about the instance type, security settings and network
settings.
➔ The instance is assigned a Public IPv4 DNS that you can use to
contact the instance from the Internet.
➔ To view more information, drag the window divider upwards.
➔ At first, the instance will appear in a Pending state, which means
it is being launched. It will then change to Initializing, and finally to
Running.
21. Wait for your instance to display the following :
● Instance State: Running
● Status Checks: 2/2 checks passed
25. Scroll through the output and note that the HTTP package was
installed from the user data that you added when you created the
instance.
26. Choose Cancel.
27. Ensure Web Server is still selected. Then, in the Actions menu,
select Monitor and troubleshoot Get instance screenshot.
28. Choose Cancel.
Task 3: Update Your Security Group and Access the Web Server
29. Ensure Web Server is still selected. Choose the Details tab.
30. Copy the Public IPv4 address of your instance to your clipboard. 31.
Open a new tab in your web browser, paste the IP address you
just copied, then press Enter
32. Keep the browser tab open, but return to the EC2 Console tab. 33. In
the left navigation pane, choose Security Groups.
34. Select Web Server security group.
35. Choose the Inbound rules tab.
➔ The security group currently has no inbound rules.
36. Choose Edit inbound rules, select Add rule and then configure :
● Type: HTTP
● Source: Anywhere-IPv4
● Choose Save rules
21
37. Return to the web server tab that you previously opened and
refresh the page.
➔ You should see the message Hello From Your Web Server!
43. With the Web Server instance still selected, choose the Storage
tab, select the name of the Volume ID, then select the checkbox next to
the volume that displays.
44. In the Actions menu, select Modify volume.
➔ The disk volume currently has a size of 8 GiB. You will now
increase the size of this disk.
45. Change the size to: 10 NOTE: You may be restricted from
creating large Amazon EBS volumes in this lab.
46. Choose Modify
47. Choose Modify again to confirm and increase the size of the
volume.
5. a) Explain about AWS EBS and AWS S3 and what their uses
Ans :
Amazon EBS (Elastic Block Store) :-
Purpose :
Purpose :
The AWS S3 Full form is Amazon The AWS EBS full form is Amazon
Simple Storage Service Elastic Block Store
AWS S3 is an object storage service It is easy to use.
that helps the industry in scalability,
data availability, security, etc.
AWS S3 is used to store and protect It has high-performance block
any amount of data for a range of storage at every scale
use cases.
AWS S3 can be used to store data It is scalable.
lakes, websites, mobile applications,
backup and restore big data
25
➔ You will use this security group when launching the Amazon RDS
database
● Choose Submit
➔ A message will appear explaining that the application is running a
command to copy information to the database. After a few
seconds the application will display an Address Book.
➔ The Address Book application is using the RDS database to store
information.
38. Test the web application by adding, editing and removing
contacts.
➔ The data is being persisted to the database and is automatically
replicating to the second Availability Zone.
39. Choose End Lab at the top of this page and then choose Yes to
confirm that you want to end the lab.
40. Choose the X in the top right corner to close the panel
7. Wait until the Status Checks for Web Server 1 displays 2/2 checks
passed. If necessary, choose refresh to update the status.
8. Select Web Server 1.
9. In the Actions menu, choose Image and templates > Create image, then
configure :
● Image name: WebServerAMI
● Image description: Lab AMI for Web Server
10. Choose Create image
➔ A confirmation banner displays the AMI ID for your new AM
43. Return to the AWS Management Console, but do not close the
application tab - you will return to it soon.
44. In the search box next to Services , search for and select
CloudWatch.
45. In the left navigation pane, choose All alarms.
● On the Services menu, choose EC2.
○ In the left navigation pane, choose Auto Scaling Groups.
○ Select Lab Auto Scaling Group.
○ In the bottom half of the page, choose the Automatic
Scaling tab.
○ Select LabScalingPolicy.
○ Choose Actions and Edit.
○ Change the Target Value to 50.
○ Choose Update
○ On the Services menu, choose CloudWatch.
○ In the left navigation pane, choose All alarms and verify you
see two alarms.
46. Choose the OK alarm, which has AlarmHigh in its name.
47. Return to the browser tab with the web application.
48. Choose Load Test beside the AWS logo.
49. Return to the browser tab with the CloudWatch console.
➔ In less than 5 minutes, the AlarmLow alarm should change to OK
and the AlarmHigh alarm status should change to In alarm.
50. Wait until the AlarmHigh alarm enters the In alarm state.
51. In the search box next to Services , search for and select EC2.
52. In the left navigation pane, choose Instances.
36
53. Select Web Server 1 (and ensure it is the only instance selected).
54. In the Instance state menu, choose Instance State > Terminate
Instance.
55. Choose Terminate
56. Choose End Lab at the top of this page and then choose Yes to
confirm that you want to end the lab.
➔ A panel will appear, indicating that "DELETE has been initiated...
You may close this message box now."
57. Choose the X in the top right corner to close the panel.
37
8. Static Website
Ans :
● Configure options :
○ Set the bucket properties, such as versioning, logging, and
tags.
● Set permissions :
○ Configure bucket permissions. For a public website, you'll
need to make your bucket and its contents public.
○ Go to the "Permissions" tab and add a bucket policy
allowing public access. Example policy:
● Go to the bucket :
○ Once the bucket is created, go to the "Overview" tab.
● Upload your website files :
○ Click the "Upload" button.
○ Add your HTML, CSS, JS, and other files.
● Make files public :
○ Select all files, click "Actions," and then choose "Make
public."
● Go to Route 53 :
○ In the AWS Management Console, find the "Route 53"
service.
● Register a domain (if you haven't already) :
○ Follow the steps to register a new domain.
● Create a record set :
○ In your hosted zone, create a new record set.
○ Choose "Alias" and select your S3 bucket endpoint from
the list.
39
● Save changes.
5. Access Your Static Website :-