Cloud Record
Cloud Record
Cloud Record
NO:711721243030
EXP. NO: 01 CREATING ACCOUNT IN AWS
DATE:
AIM:
PROCEDURE:
5. Enter a strong password for your root user, confirm it, and then choose Continue. AWS requires that
your password meet the following conditions:
b. It must include a minimum of three of the following mix of character types: uppercase,
6. Choose Business or Personal. Personal accounts and business accounts have the same features and
functions.
8. Read and accept the AWS Customer Agreement. Be sure that you read and understand the terms of the
9. Choose Continue. At this point, you'll receive an email message to confirm that your AWS account is
ready to use. You can sign in to your new account by using the email address and password you
provided during sign up. However, you can't use any AWS services until you finish activating your
account.
use a different billing address for your AWS billing information, choose Use a new address.
You can't proceed with the sign-up process until you add a valid payment method.
11. Enter your country or region code from the list, and then enter a phone number where you can be
12. Enter the code displayed in the CAPTCHA, and then submit.
13. When the automated system contacts you, enter the PIN you receive and then submit.
14. Select one of the available AWS Support plans and choose Complete sign up. A confirmation page
15. Check your email and spam folder for an email message that confirms your account was activated.
Activation usually takes a few minutes but can sometimes take up to 24 hours.
After you receive the activation message, you have full access to all AWS services.
RESULT:
Create a Cloud Organization in AWS/Google Cloud/or any equivalent Open-Source cloud softwares like
Openstack, Eucalyptus, OpenNebula with Role-based access control is executed successfully and the output
is verified.
AIM:
To Create a Cost-model for a web application using various services and do Cost-benefit
analysis.
PROCEDURE:
Application architecture
The diagram below provides a visual representation of the services used in this exercise and
how they are connected. This application uses AWS Amplify, Amazon API Gateway, AWS
Lambda, Amazon DynamoDB, and AWS Identity and Access Management (IAM).
1. Open your favorite text editor on your computer. Create a new file and paste the following
HTML in it:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World</title>
</head>
<body>
Hello World
</body>
</html>
4. In a new browser window, log into the Amplify console. Note: We will be using the
Oregon (us-west-2) Region for this tutorial.
5. In the Get Started section, under Host your web app, choose the orange Get started button.
6. Select Deploy without Git provider. This is what you should see on the screen:
10. Select the Drag and drop method. This is what you should see on your screen:
14. After a few seconds, you should see the message Deployment successfully completed.
2. Copy and paste the URL displayed in the form into your browser.
Make sure you create your function in the same Region in which you created the web app in the
previous module. You can see this at the very top of the page, next to your account name.
Select Python 3.8 from the runtime dropdown and leave the rest of the defaults unchanged.
7. You should see a green message box at the top of your screen with the following
message "Successfully created the function HelloWorldFunction."
8. Under Code source, replace the code in lambda_function.py with the following:
# import the JSON utility package since we will be working with a JSON object
import json
# define the handler function that the Lambda service will use as an entry point
def lambda_handler(event, context):
# extract values from the event object we got from the Lambda service
name = event['firstName'] +' '+ event['lastName']
# return a properly formatted JSON object
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda, ' + name)
}
9. Save by going to the file menu and selecting Save to save the changes.
11. Let's test our new function. Choose the orange Test button to create a test event by
selecting Configure test event.
13. Copy and paste the following JSON object to replace the default one:
{
"firstName": "Ada",
"lastName": "Lovelace"
}
1. Under the HelloWorldFunction section at the top of the page, select Test tab.
2. You should see a light green box at the top of the page with the following text: Execution
result: succeeded. You can choose Details to see the event the function returned.
c) Deploy API
d) Validate API
{
"firstName":"Grace",
"lastName":"Hopper"
}
6. On the right side, you should see a response with Code 200.
Great! We have built and tested an API that calls our Lambda function.
9. Copy the Amazon Resource Name (ARN). You will need it later.
"dynamodb:DeleteItem",
"dynamodb:GetItem",
"dynamodb:Scan",
"dynamodb:Query",
"dynamodb:UpdateItem"
],
"Resource": "YOUR-TABLE-ARN"
}
]
}
9. This policy will allow our Lambda function to read, edit, or delete items, but restrict it
to only be able to do so in the table we created.
10. Choose the blue Review Policy button.
13. You can now close this browser tab and go back to the tab for your Lambda function.
1. Select the Code tab and select your function from the navigation pane on the left
side of the code editor.
2. Replace the code for your function with the following:
import json
# import the AWS SDK (for Python the package name is boto3)
import boto3
# import time
import time
# import two packages to help us with dates and date formatting
# create a DynamoDB object using the AWS SDK
dynamodb = boto3.resource('dynamodb')
# use the DynamoDB object to select our table
table = dynamodb.Table('HelloWorldDatabase')
# define the handler function that the Lambda service will use as an entry point
def lambda_handler(event, context):
# Get the current GMT time
gmt_time = time.gmtime()
# store the current time in a human readable format in a variable
# Format the GMT time string
now = time.strftime('%a, %d %b %Y %H:%M:%S +0000', gmt_time)
# extract values from the event object we got from the Lambda service and store in a variable
name = event['firstName'] +' '+ event['lastName']
# write name and time to the DynamoDB table using the object we instantiated and save
response in a variable
response = table.put_item(
Item={
'ID': name,
'LatestGreetingTime':now
})
# return a properly formatted JSON object
return {
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World</title>
<!-- Add some CSS to change client UI -->
<style>
body {
background-color: #232F3E;
}
label, button {
color: #FF9900;
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
margin-left: 40px;
}
input {
color: #232F3E;
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
margin-left: 20px;
}
</style>
<script>
// define the callAPI function that takes a first name and last name as parameters
var callAPI = (firstName,lastName)=>{
// instantiate a headers object
3. Make sure you add your API Invoke URL on Line 41 (from module three). Note: If you do
not have your API's URL, you can get it from the API Gateway console by selecting your API
and choosing stages.
10. When the file is uploaded, a deployment process will automatically begin. Once you see
a green bar, your deployment will be complete.
Create a Cost-model for a web application using various services and do Cost-benefit analysis
has been executed successfully and the output is verified.
AIM:
PROCEDURE:
Step-1: Go to the AWS console and login using your credentials. After that, go to the My
Billing Dashboard menu.
Step-2: Go to the Billing Preferences and check on Receive PDF Invoice by Email and Receive
Billing Alerts. Also, check on Receive Free Tier Usage Alerts and input your email if you are
using AWS Free Tier.
Amazon CloudWatch is basically a monitoring service, so you can monitor your AWS
services and trigger an alarm when something unexpected happens.
Step-3: You can set up the condition. For example, if you are using AWS free tier, you
can set the value to 0. So you will get an alert if your estimated charges are greater than
$0. After you finished setting up the condition, click next.
Step-5: Input alarm name. For example, Billing alert. After that, click next.
If successful, you will see an alert “Successfully created alarm” and the billing alarm is
created ,
DATE:
AIM:
PROCEDURE:
Budget Alerts
Step-1 : Go to the billing section, explore details like EC2 usage, instance types, and data
transfer metrics to understand the diverse usage measurements (hours vs. GB).
Step-2 : Head back to the budget section and click on "Create budget." and Select
"Usage Budget" and proceed to set up the budget details.
Step-4 : opt for a recurring budget starting from a chosen month (e.g. March).
Step-5 : Define the usage type (e.g., EC2 running hours) and set the budget amount (e.g.,
100 hours).
Step-6 : Configure the threshold for alerts (e.g., 80% of the defined budget) and Add
email recipients for alerts.
Verify the created usage budget in the AWS Cost Explorer and check other details.
RESULT:
Create alerts for usage of Cloud resources has been executed successfully and the output is
verified.
DATE:
AIM:
PROCEDURE:
S3:
Overview:
2.) In there search for S3 and click the link with S3 with description of scalable storage in
the cloud.
5.) After clicked create bucket button, you will see the UI for configuration.
7.) Under Block public access section make sure to untick the checkbox showing block all
public access
8.) And tick the checkbox inside the alert box saying “I acknowledge that the current settings
might result in this bucket and the objects within becoming public”.
9.) Now click create bucket button in the bottom.
10.) Now you can see this alert like “successfully created” and you can also view details of
your bucket by clicking view details button.
1.) Under the list of your buckets. Click the bucket you have now created.
2.) Then it will show the objects section. In this section we gonna upload web files for
hosting and deploying.
3.) Open any code editor and create three files name it as “index.html”, “style.css”.
4.) Add this code in html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Recording</title>
</head>
<div class="center">
</div>
</body>
</html>
@import url(https://fonts.googleapis.com/css?family=Agbalumo);
@import url(https://fonts.googleapis.com/css?family=Nunito);
margin: 0;
padding: 0;
box-sizing: border-box;
.center{
margin-left: auto;
margin-right: auto;
width: max-content;
height: 5rem;
font-size: 2em;
padding: 5em;
font-family: 'Agbalumo';
.center span{
color: white;
font-family: 'Nunito';
6.) Come to S3 object space and click upload button and click “Add files” and then select the
html and css files and click upload.
7.) After uploading the files you will see this success box.
8.) Now you can see the files that you uploaded.
"Version": "2012-10-17",
"Statement": [
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::your-bucket-name/*"
1.) In the properties section scroll down to reach “Static website hosting”.
RESULT:
Create a Web Application using S3 has been executed successfully and the output is verified.