Cloud Computing Aws Lab
Cloud Computing Aws Lab
bash
CopyEdit
chmod 400 your-key.pem
3. Connect:
bash
CopyEdit
ssh -i "your-key.pem" ec2-user@<public-ip>
For Ubuntu:
bash
CopyEdit
ssh -i "your-key.pem" ubuntu@<public-ip>
On Amazon Linux:
bash
CopyEdit
sudo yum update -y
sudo yum install gcc gcc-c++ -y
On Ubuntu:
bash
CopyEdit
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential -y
1. Create file:
bash
CopyEdit
nano hello.c
c
CopyEdit
#include <stdio.h>
int main() {
printf("Hello from AWS EC2!\n");
return 0;
}
3. Compile:
bash
CopyEdit
gcc hello.c -o hello
4. Run:
bash
CopyEdit
./hello
Output
csharp
CopyEdit
Hello from AWS EC2!
Result
Successfully launched an EC2 instance, installed a C compiler, and executed a basic program.
2.Create S3 bucket and upload a file using AWS S3 bucket.
✅ Output
You’ll see your file listed in the bucket with its Object URL.
Result
Successfully created an S3 bucket and uploaded a file using:
AWS Console
AWS CLI
3.Demonstrate the procedure for creating AWS RDS instance
and execute sample SQL statement
bash
CopyEdit
sudo apt install mysql-client -y # Ubuntu/Debian
2. Connect:
bash
CopyEdit
mysql -h <endpoint> -u admin -p
o Replace <endpoint> with the RDS endpoint from the AWS console.
o Enter your password when prompted.
-- Create a table
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
grade INT
);
Expected Output
pgsql
CopyEdit
+----+-------+-------+
| id | name | grade |
+----+-------+-------+
| 1 | Alice | 85 |
| 2 | Bob | 92 |
+----+-------+-------+
Result
Successfully:
Launched an RDS MySQL instance
Connected to it using MySQL client or Workbench
Created a table and executed SQL queries
4.Host a web application in AWS instance
Step 1: Launch an EC2 Instance
bash
CopyEdit
chmod 400 your-key.pem
ssh -i "your-key.pem" ec2-user@<public-ip>
bash
CopyEdit
sudo yum update -y
sudo yum install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd
For Ubuntu:
bash
CopyEdit
sudo apt update
sudo apt install apache2 -y
sudo systemctl start apache2
sudo systemctl enable apache2
bash
CopyEdit
echo "<h1>Hello from AWS Web Server!</h1>" | sudo tee /var/www/html/index.html
Install Node.js:
bash
CopyEdit
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
sudo yum install -y nodejs
bash
CopyEdit
mkdir myapp && cd myapp
nano app.js
javascript
CopyEdit
const http = require('http');
const server = http.createServer((req, res) => {
res.end('Hello from Node.js app on AWS EC2!');
});
server.listen(80, () => console.log('Server running on port 80'));
bash
CopyEdit
sudo node app.js
1. Open a browser
2. Visit: http://<your-ec2-public-ip>
Output
Your browser should display:
Node.js App:
csharp
CopyEdit
Hello from Node.js app on AWS EC2!
Result
Successfully hosted a basic web application on AWS EC2 using:
html
CopyEdit
<!DOCTYPE html>
<html>
<head><title>Azure App</title></head>
<body>
<h1>Hello from Azure Web App!</h1>
</body>
</html>
python
CopyEdit
# app.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello from Azure Flask App!"
if __name__ == "__main__":
app.run()
Include a requirements.txt:
nginx
CopyEdit
flask
🔹 Step 3: Deploy Your App to Azure
bash
CopyEdit
az login
bash
CopyEdit
az webapp up --name mywebapp-<uniqueID> --resource-group WebAppGroup --runtime
"PYTHON:3.11"
1. Go to:
arduino
CopyEdit
https://mywebapp-<uniqueID>.azurewebsites.net
Output
HTML App:
csharp
CopyEdit
Hello from Azure Web App!
csharp
CopyEdit
Hello from Azure Flask App!
Result
Successfully developed and deployed a web application on Microsoft Azure using Azure App
Service.
6.Create a Customer Relationship Management System (CRM)
using salesforce.com portal.
1. Go to: https://developer.salesforce.com/signup
2. Fill in the required details.
3. Activate your account through the verification email.
4. Login to: https://login.salesforce.com
Output
You will have:
Result
Successfully created a basic CRM system on Salesforce using custom objects, fields, and
logic.
7.Design scheduler and personal information management using
zohoworkerly
Step 1: Sign Up and Access Zoho Workerly
1. Go to https://www.zoho.com/workerly/
2. Click Start Free Trial or sign in with your Zoho account.
3. You’ll be taken to the Zoho Workerly dashboard.
Output
A functioning digital scheduler
A database of temps with personal info
Shifts and jobs linked to clients and temps
Notifications and reports managed within the platform
Result
Successfully designed and implemented a Scheduler and Personal Information
Management System using Zoho Workerly.
8.Create and use a repository using github
Step 1: Create a GitHub Repository
In terminal:
bash
CopyEdit
git clone https://github.com/yourusername/MyFirstRepo.git
cd MyFirstRepo
bash
CopyEdit
echo "Hello GitHub!" > hello.txt
bash
CopyEdit
git add hello.txt
bash
CopyEdit
git commit -m "Added hello.txt file"
bash
CopyEdit
echo "This is an update." >> hello.txt
bash
CopyEdit
git add hello.txt
git commit -m "Updated hello.txt"
git push origin main
Output
A GitHub repository visible at https://github.com/yourusername/MyFirstRepo
The hello.txt file containing:
pgsql
CopyEdit
Hello GitHub!
This is an update.
Result
Successfully created a GitHub repository, cloned it, made changes, and pushed updates to the
cloud.
9.Create visually appealing data visualizations and insightful
dashboards using Zoho
Step 1: Access Zoho Analytics
1. Go to https://analytics.zoho.com/
2. Sign in with your Zoho account.
3. Click Create Workspace:
o Name: Sales Dashboard
o Description: Optional
o Click Create
Customize:
Output
A fully interactive and visually rich Sales Dashboard with:
Result
Successfully created insightful data visualizations and dashboards using Zoho Analytics.
10.Create a blog to show the profile of our MCA department
1. Create a Homepage:
o Go to Pages → Add New.
o Title it Home and provide a brief introduction to the MCA department, its
mission, and vision.
o Example Content:
text
CopyEdit
Welcome to the MCA Department of XYZ University. Our department offers a
comprehensive program designed to prepare students for the challenges of the rapidly
evolving tech industry. Explore our courses, faculty, and state-of-the-art facilities here.
text
CopyEdit
The MCA Department recently hosted a workshop on Artificial Intelligence, focusing on hands-on
learning and industry trends. The event saw enthusiastic participation from students and faculty. Read
more about the workshop and future events below!
4. Publish the post, and it will automatically show on your blog’s News or Updates
section.
1. Go to Appearance → Widgets.
2. Add useful widgets such as:
o Navigation menu: This can include links to your Home, Programs Offered,
Faculty, News, and Contact pages.
o Recent Posts: Show recent blog posts or updates.
o Social Media Links: Add icons to link to the department’s social media
accounts (Facebook, LinkedIn, etc.).
o Search Bar: Allow users to search for content easily.
Output
A fully functioning WordPress blog that displays the MCA Department profile.
The blog will feature various pages like Programs Offered, Faculty, Facilities, and
News.
Blog posts will showcase events, achievements, and other department updates.
Users can easily navigate between pages and blog posts.
Result
Successfully created a blog that presents the MCA Department’s Profile using WordPress,
showcasing essential details and providing easy access to various sections through widgets
and menu items.
11.Demonstrate the steps for web application deployment using
azure devops
1. Navigate to Pipelines:
o In the Azure DevOps project, go to the Pipelines tab and click Create
Pipeline.
2. Connect to the Repository:
o Choose your repository source (e.g., Azure Repos Git or GitHub).
o Select the repository that contains your web application source code.
3. Configure Build Pipeline:
o Azure DevOps will auto-detect your project type and suggest an appropriate
build pipeline configuration (e.g., ASP.NET, Node.js, etc.).
o If it doesn't auto-detect, choose the appropriate template for your project (e.g.,
ASP.NET Core for .NET applications).
o For a Node.js app, choose the Node.js template and configure steps like:
yaml
CopyEdit
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- script: |
npm install
npm run build
displayName: 'npm install and build'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
publishLocation: 'Container'
4. Save and Run the Pipeline:
o Click Save and Run to execute the build pipeline.
o The build will compile your application and generate an artifact (e.g., drop
folder) that will be used in the release pipeline.
1. Navigate to Releases:
o Go to the Pipelines → Releases tab in Azure DevOps.
o Click New pipeline to create a release pipeline.
2. Link the Build Artifact:
o In the pipeline, click Add an artifact.
o Select Build and choose the build pipeline you created earlier.
o Select the artifact (e.g., drop folder) that you want to deploy.
3. Define Stages for Deployment:
o Add a stage (e.g., Development, Production).
o In the Stage, click Add a task.
o Search for Azure App Service Deploy.
o Configure the Azure App Service Deploy task:
Azure Subscription: Select your Azure subscription.
App Service Name: Choose the Azure Web App where you want to
deploy.
Package or folder: Set this to the path where the build artifact was
published (e.g., $(System.DefaultWorkingDirectory)/_drop/drop).
4. Configure Triggers:
o Configure the pipeline trigger to start the deployment process automatically
when the build pipeline completes successfully.
o Under Triggers, enable the option to automatically trigger the release after a
successful build.
5. Save and Release:
o Click Save to save the release pipeline.
o Click Release to start the deployment process.
1. Track Deployment:
o After releasing the application, go to the Releases section.
o Monitor the progress and check the logs for each stage of deployment.
2. Verify the Web App:
o Once the deployment is complete, go to the Azure Portal.
o Navigate to App Services and select your Web App.
o Verify that your web application is live and accessible by visiting the provided
URL.
🔹 Step 5: Continuous Integration and Continuous Deployment (CI/CD)
1. Commit Changes:
o Make changes to your codebase (e.g., fix a bug, add a feature).
o Commit and push the changes to the Azure DevOps repository.
2. Auto-Build and Auto-Deploy:
o The Build Pipeline will trigger automatically and build the updated
application.
o The Release Pipeline will automatically deploy the new version of the web
application to your Azure Web App.
Output
A fully functional CI/CD pipeline using Azure DevOps that:
o Automatically builds the web application when changes are pushed to the
repository.
o Automatically deploys the built application to Azure Web App.
Continuous updates to your application when code changes occur.
Result
Successfully deployed a web application using Azure DevOps with automated build and
release pipelines for CI/CD.
12.Create a web application and deployment in 000webhost cloud
platform
html
CopyEdit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Application</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Welcome to My Web Application</h1>
<button id="clickButton">Click Me!</button>
<p id="message"></p>
</div>
<script src="script.js"></script>
</body>
</html>
3. Write the CSS Code: Open style.css and add the following code to style the web
page:
css
CopyEdit
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
text-align: center;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}
button {
background-color: #007BFF;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
4. Write the JavaScript Code: Open script.js and add the following code to create an
interactive button:
javascript
CopyEdit
document.getElementById('clickButton').addEventListener('click', function() {
document.getElementById('message').innerText = 'Hello, welcome to the web app!';
});
Output
A live website hosted on 000WebHost, accessible at the URL provided by the
platform (e.g., https://myfirstwebapp.000webhostapp.com).
The website should have a button, and when clicked, it will show a greeting message.
Result
Successfully created and deployed a simple web application on 000WebHost. The
application allows interaction through JavaScript and is styled using CSS.