Csm
Csm
AIM:
To create a cloud organization in AWS with Roll-based access control
THEORY:
Creating a Cloud Organization involves establishing a hierarchical structure within a cloud platform, such
as AWS, Google Cloud, or an open-source alternative like OpenStack, Eucalyptus, or OpenNebula. This
structure typically includes various levels of access control, allowing different users or teams to have
specified permissions based on their roles within the organization. Role-based access control (RBAC) is a
crucial aspect of this setup, as it enables administrators to assign roles to users, defining what actions they
can perform and what resources they can access within the cloud environment. RBAC helps maintain
security, streamline operations, and ensure compliance by aligning access privileges with organizational
roles and responsibilities. This model allows for granular control over permissions, facilitating efficient
management of cloud resources while minimizing the risk of unauthorized access or misuse.
PROCEDURE:
To create an organization in AWS with role-based access, you can follow these general steps:
1. Create an AWS account:If you don't already have an AWS account, you'll need to create one.
This will be your management account and the root of your organization.
2. Enable AWS Organizations:From the AWS Management Console, navigate to the AWS
Organizations service and enable it. This will create the organization with your management
account as the master account.
3. Create OUs (Organizational Units):You can create one or more OUs to organize your accounts.
For example, you might create separate OUs for different departments or environments (e.g.,
production, staging, development).
4. Create member accounts:You can create new AWS accounts and invite existing accounts to join
your organization as member accounts. You can add these accounts to the appropriate OUs.
5. Create service control policies (SCPs):SCPs are policies that you can attach to OUs or individual
accounts to deLne the maximum set of actions that can be performed on resources in those OUs or
accounts. This allows you to enforce role-based access and other security policies across your
organization.
6. Assign IAM roles:You can create IAM roles in your management account and delegate speciLc
permissions to them. You can then assume these roles from your member accounts to perform
actions on resources in the management account or other member accounts.
7. Configure permissions: You can use IAM policies to control access to AWS services
and resources. You can attach these policies to IAM users, groups, or roles in your
management account or member accounts.
To create a role with specific permissions, you can follow these steps:
ii. Create a new role and choose the appropriate trusted entity (e.g., another AWS account,
an AWS service, or your AWS Organizations).
iii. Define the permissions for the role by attaching an IAM policy or a service control
policy (SCP).
iv. Save the role and note down the ARN (Amazon Resource Name) of the role.
v. In the AWS Organizations console, attach the role to the appropriate OU or account.
In the member account, assume the role to perform actions on resources in the management
account or other member accounts.
RESULT:
Thus, the Cloud Organization was created in AWS with Role-Based Access Control was
implemented successfully.
In a large enterprise using AWS Organizations, different departments like IT, finance, marketing,
and operations are organized into distinct units. Each unit has specific roles defined, such as Cloud
Administrator for IT, Financial Analyst for finance, etc. These roles are granted tailored permissions
within the AWS environment, ensuring that access to cloud resources aligns with organizational
responsibilities, enhancing security and operational efficiency.
VIVA QUESTIONS
1. What is the purpose of implementing role-based access control (RBAC) in a cloud organization?
The purpose of implementing Role-Based Access Control (RBAC) in a cloud organization is to restrict
access to resources based on user roles, ensuring security and efficient permission management. This helps
limit access to only those who need it, reducing the risk of unauthorized actions.
3. Can you explain how organizational units (OUs) are used to structure a cloud organization?
Organizational Units (OUs) structure a cloud organization by grouping resources and users for easier
management of policies and permissions.
4. What are some common roles and responsibilities that can be defined within a cloud organization?
Common cloud roles include Administrator, Developer, Security Officer, Auditor, and User, each with
specific responsibilities like managing resources, ensuring security, and accessing services.
5. How does RBAC help ensure compliance with regulatory requirements within the cloud
environment?
RBAC ensures compliance by restricting access to sensitive data based on roles, aligning with regulatory
requirements for data protection and privacy.
EX.NO:02 Create a Cost-model for a web application using various services and do Cost-benefit
analysis
Date:
AIM:
To create a cost model for a web application using various services and make a analysis for cost-
benefit analysis.
THEORY:
Developing a cost model for a web application involves estimating expenses across infrastructure,
platform services, development tools, staffing, and ongoing operations. This includes cloud hosting
costs, licensing fees, and labor expenses for developers and administrators. In the subsequent cost-
benefit analysis, factors such as revenue potential, cost savings, efficiency gains, improved customer
experience, and strategic alignment with business goals are crucial. This analysis aids in making
informed decisions about the viability and value of the web application project by balancing costs
against anticipated benefits.
PROCEDURE:
Cost modeling is an exercise where you create logical groups of cloud resources that are mapped to the
organization's hierarchy and then estimate costs for those groups. The goal of cost modeling is to
estimate the overall cost of the organization in the cloud.
Consider tradeoffs:
Optimal design doesn't equate to a lowest-cost design.:
As you prioritize requirements, cost can be adjusted. Expect a series of tradeoffs in the areas that you
want to optimize, such as security, scalability, resilience, and operability. If the cost to address the
challenges in those areas is high, stakeholders look for alternate options to reduce cost. There might be
risky choices made in favor of a cheaper solution.
There's also options for fixed price where you're charged for provisioned resources.
Most services are priced based on units of size, amount of data, or operations. Understand the meters
that are available to track usage. For more information, see Azure resources.
At the end of this exercise, you should have identified the lower and upper limits on cost and set budgets
for the workload. Azure lets you create and manage budgets in Azure Cost Management.
Budgets are supported for the following types of Azure account types and scopes:
• Azure role-based access control (Azure RBAC) scopes
o Management groups
o Subscription
• Enterprise Agreement scopes
o Billing account
o Department
o Enrollment account
• Individual agreements
o Billing account
• Microsoft Customer Agreement scopes
o Billing account
o Billing profile
o Invoice section
o Customer
• AWS scopes
o External account
o External subscription
Select the following image to sign in to Azure and open a template. The template creates a budget
without any filters
• Time Grain: enter the time covered by a budget. Allowed values are Monthly, Quarterly,
or Annually.
The budget resets at the end of the time grain.
• Start Date: enter the start date with the first day of the month in YYYY-MM-DD format.
A future start date shouldn't be more than three months from today.
• You can specify a past start date with the Time Grain period.
• End Date: enter the end date for the budget in YYYY-MM-DD format.
• First Threshold: enter a threshold value for the first notification. A notification is sent
when the cost exceeds the threshold. It's always percent and has to be between 0.01 and 1000.
• Second Threshold: enter a threshold value for the second notification. A notification is
sent when the cost exceeds the threshold. It's always percent and has to be between 0.01 and
1000.
• Contact Email sender a list of email addresses to send the budget notification to when a
threshold is exceeded. It accepts an array of strings. Expected format is
["[email protected]","[email protected]"].
• Review the terms and conditions, select I agree to the terms and conditions stated
above, and then select Purchase.
The Azure portal is used to deploy the template. In addition to the Azure portal, you can also use
Azure PowerShell, Azure CLI, and REST API. To learn about other deployment templates, see
Deploy templates.
• Azure portal
• CLI
• PowerShell
Navigate to Cost Management + Billing> select a scope >Budgets.
Clean up resources
When you no longer need a budget, delete it by using one the following methods:
• Azure portal
• CLI
• PowerShell
Navigate to Cost Management + Billing> select a billing scope >Budgets> select a budget > then
selectDelete budget.
RESULT:
Thus a Cost-model for a web application using various services and do Cost-benefit analysis was
created.
- Infrastructure Costs: Estimate expenses for cloud hosting services like AWS, including virtual
machines, storage, and networking.
- Platform Services: Account for costs of essential platform services such as databases (e.g., Amazon
RDS), CDN (e.g., Amazon CloudFront), and load balancing (e.g., AWS Elastic Load Balancing).
- Development Tools: Factor in expenses for development tools like JetBrains PHP Storm and
potential framework licenses.
- Staffing Costs: Estimate labor costs for developers, administrators, and possibly DevOps engineers.
- Operational Expenses: Project ongoing costs for monitoring (e.g., Datadog), logging (e.g., AWS
CloudWatch), and backup services.
Cost-Benefit Analysis:
- Revenue Generation: Estimate subscription revenue and potential additional income from ads or
partnerships.
- Cost Savings: Assess savings compared to traditional TV broadcasting, including infrastructure and
operational efficiencies.
- Enhanced Customer Experience: Evaluate personalized content, seamless playback, and responsive
support on user retention.
- Strategic Alignment: Analyze how unique content offerings and global scalability align with strategic
objectives and provide a competitive edge.
VIVA QUESTIONS:
1. What are the main components included in the cost-model for a web application?
The main components are infrastructure costs, development and maintenance, licensing fees, security, and
operational expenses.
3. Can you explain the significance of conducting a cost-benefit analysis for a web application project?
A cost-benefit analysis helps evaluate the financial feasibility of a web application project by comparing the
costs of development and maintenance with the potential benefits, ensuring informed decision-making and
resource optimization.
5. How do you determine the revenue generation potential of a web application, and why is it
important in the cost-benefit analysis?
Revenue potential is determined by analyzing target market size, pricing models, user engagement,
and monetization strategies (e.g., subscriptions, ads). It's important in cost-benefit analysis to ensure
the project's profitability and justify its investment.
EX.NO:03 Create alerts for usage of Cloud Resources
Date:
AIM:
To create alerts for usage of Cloud Resources
THEORY:
Creating alerts for cloud resource usage is essential for proactive monitoring and optimization of cloud
infrastructure. These alerts notify organizations when resource utilization surpasses predefined
thresholds, allowing them to address performance issues, security threats, and inefficiencies promptly.
By monitoring metrics like CPU, memory, disk space, and network traffic, organizations can prevent
downtime, optimize resource allocation, and ensure the scalability and reliability of cloud-based
services. Additionally, these alerts facilitate cost optimization by identifying opportunities to right-size
instances, automate scaling, and implement cost-saving measures. Overall, they contribute to enhanced
operational efficiency, performance, and cost-effectiveness in cloud environments.
PROCEDURE:
To create alerts for usage of Cloud resources in AWS, you can use Amazon CloudWatch and AWS Lambda.
Here's an example code that creates an alert for Amazon S3 bucket usage:
1. Create an IAM role for the Lambda function with the following policy.
2. Create a new Lambda function with the following code.
3. Set the Lambda function trigger to run every day at a specific time.
4. Create a CloudWatch alarm with the following code.
PROGRAM:
Policy for Role: (JSON code)
{
"Version": "2012-10-17",
"Statement": [
{
"Elect": "Allow", "Action": [
"cloudwatch:PutMetricAlarm", "cloudwatch:DescribeAlarms", "cloudwatch:GetMetricData",
"cloudwatch:GetMetricStatistics"
],
"Resource": "*"
},
{
s3 = boto3.client('s3')
cloudwatch = boto3.client('cloudwatch')
'Value': 'your-bucket-name'
},
],
'Timestamp': datetime.datetime.now(), 'Value': size,
'Unit': 'Bytes'
},
]
)
except Exception as e:
print(e)
cloudwatch = boto3.client('cloudwatch')
def create_alarm():
try:
cloudwatch.put_metric_alarm(
AlarmName='S3BucketSizeAlarm',
AlarmDescription='Alarm if S3 bucket size exceeds 10 GB',
Namespace='S3',
MetricName='BucketSize',
Statistic='SampleCount',
Period='86400',
EvaluationPeriods='1',
Threshold='10000000000',
ComparisonOperator='GreaterThanThreshold',
AlarmActions=[
'arn:aws:sns:us-east-1:123456789012:your-sns-topic-arn'
],
Dimensions=[
{
'Name': 'BucketName',
'Value': 'your-bucket-
name'
},
],
AlarmDescription='Alarm if S3 bucket size exceeds 10 GB'
)
except Exception as e:
print(e)
create_alarm()
OUTPUT:
RESULT:
Thus, usage alerts for cloud resources were implemented successfully.
REAL TIME APPLICATION:
Another real-time application for creating alerts for usage of cloud resources is in the context of a data
analytics platform. Suppose a company utilizes cloud services to run data processing and analysis tasks on
a large scale. By setting up alerts for resource usage metrics such as compute instances, storage, and data
transfer, the organization can monitor the health and efficiency of their analytics infrastructure. For
instance, if data storage usage exceeds a predefined threshold, an alert can notify the data engineering
team to optimize data storage or implement data archiving strategies to control costs. Similarly, alerts for
compute instance utilization can help ensure that processing tasks are efficiently distributed and scaled
based on demand. This proactive monitoring ensures that the data analytics platform operates smoothly,
enabling timely insights and decision-making based on the analyzed data while optimizing resource
utilization and controlling costs.
VIVA QUESTIONS:
2. What are some common metrics that organizations monitor using resource usage alerts?
Common metrics include CPU usage, memory usage, disk space, network traffic, API requests, cost, instance
health, and database connections.
4. Can you explain how alerts for cloud resource usage help in optimizing performance and cost?
Alerts optimize performance by detecting resource imbalances and help control costs by identifying unused
or overused resources, allowing for adjustments to improve efficiency.
5. What are the benefits of using real-time alerts for managing cloud resources compared to
manual monitoring?
Real-time alerts enable quick responses, proactive management, continuous monitoring, increased
efficiency, and reduced human error compared to manual monitoring.
EX.NO:04
Create Billing alerts for your Cloud Organization
Date:
AIM:
To create billing alerts for your cloud organization.
THEORY:
Creating billing alerts for a cloud organization is essential for maintaining cost control and preventing
unexpected expenses. By setting up billing alerts, organizations can receive notifications when their
cloud spending reaches predefined thresholds, allowing them to monitor usage and budget effectively.
These alerts can be configured based on various parameters such as total spending, spending by service,
or spending by specific resource groups. By proactively monitoring billing metrics and receiving alerts,
organizations can identify cost spikes, optimize resource usage, and take necessary actions to stay
within budget constraints. Additionally, billing alerts promote financial accountability and help
organizations make informed decisions regarding resource allocation and cloud utilization.
PROCEDURE:
1. Sign in to the AWS Management Console and navigate to the Billing and Cost Management
service.
2. In the navigation pane, choose "Budgets".
3. Click on "Create budget" and select "Cost budget".
4. Provide a name and description for your budget.
5. Choose the time period for your budget (e.g., Monthly, Quarterly, Annually).
6. Configure the budget threshold. You can choose to set acexed budget amount or a
percentage of your actual costs.
7. Configure the alerts. You can choose to receive alerts via email or Amazon SNS.
PROGRAM:
"Amount": "1000",
"Unit": "USD"
},
"CostFilters": {
"LinkedAccount": ["123456789012"]
},
"CostTypes": {
"IncludeTax": true,
"IncludeSubscription": true,
"UseBlended": false,
"IncludeRefund": true,
"IncludeCredit": true,
"IncludeUpfront": true,
"IncludeRecurring": true,
"IncludeOtherSubscription": true
, "IncludeSupport": true,
"IncludeDiscount": true,
"UseAmortized": false
},
"TimeUnit": "MONTHLY",
{
"Notfication": { "NotificationType": "ACTUAL",
},
"Subscribers": [
]
},
OUTPUT:
RESULT:
Thus, billing alerts for your Cloud Organization were implemented successfully.
VIVA QUESTIONS:
1. What is the purpose of setting up billing alerts in a cloud organization?
The purpose of setting up billing alerts in a cloud organization is to monitor costs, prevent overspending,
and ensure the organization stays within budget by notifying users when expenses approach or exceed
predefined limits.
4. What are some key metrics that can be monitored using billing alerts?
Key metrics include total spending, service costs, usage thresholds, regional costs, and project/department
costs.
AIM:
To compare Cloud cost for a simple web application across AWS, Azure and GCP and suggest the best one
THEORY:
When comparing the costs of hosting a simple web application across AWS, Azure, and GCP, it's essential
to consider various factors to make an informed decision. Each cloud provider offers different pricing
structures and services, impacting the overall cost. Typically, the main cost components include compute
instances, storage, and data transfer. AWS, Azure, and GCP provide pricing calculators to estimate costs
based on usage. Additionally, it's crucial to evaluate any potential discounts, such as reserved instances or
sustained use discounts, offered by each provider. Real-time examples, like a small blogging platform or
an e-commerce site, can help contextualize the cost comparison. Ultimately, the best choice depends on the
specific requirements of the web application, budget constraints, and the desired level of service and
support. Therefore, conducting a thorough cost analysis and considering factors beyond just pricing can
aid in selecting the most suitable cloud provider for hosting the simple web application.
PROCEDURE/COMPARISON:
Amazon Web Services: Amazon Web Services is a subsidiary of amazon.com, which provides an on-
demand Cloud Computing platform to individuals, companies, and governments on a paid-subscription
basis. Amazon Web Services is the oldest and the most experienced player in the cloud market. As one of
the oldest cloud providers, it has established a bigger user base, as well as bigger trust and reliability
factors. Check out Intellipaat’s AWS training to get ahead in your career! AWS was publicly launched in
2006 with service offerings such as Elastic Compute Cloud (EC2), Simple Storage Service (Amazon S3),
etc. By 2009, Elastic Block Store (EBS) was made public, and services such as Amazon CloudFront,
Content delivery network (CDN), and more formally joined the AWS Cloud Computing Service offerings.
Microsoft Azure: Microsoft Azure, initially called Azure, was launched in 2010 with the intent to
provide a competent Cloud Computing platform for businesses. Azure was renamed as ‘Microsoft Azure’
in 2014, though the name ‘Azure’ is still commonly used. Since its inception, Microsoft Azure has shown
great progress among its competitors. Kickstart your career journey by enrolling in this Google Cloud
training in London.
Google Cloud Platform Google Cloud Platform (GCP), which is offered by Google, is a suite of Cloud
Computing services that runs on the same infrastructure that Google uses internally for its end-user
products such as Google Search engine, YouTube, and more. Google Cloud Platform began its journey in
2011, and in less than a decade it has managed to create a good presence in the cloud industry. The initial
intent of Google Cloud was to strengthen Google’s own products such as Google Search engine and
YouTube. But now, they have also introduced their enterprise services so that anyone can use Google
Cloud Platform which shares the same infrastructure as that of Google Search or YouTube
AWS Vs. Azure Vs. Google Cloud: Services
Compute services
Services AWS Azure GCP
IaaS Amazon Elastic Compute Cloud Virtual Machines Google Compute
Engine
PaaS AWS Elastic Beanstalk App Service and Cloud Google App Engine
Services
Containers Amazon Elastic Compute Cloud Azure Kubernetes Service Google Kubernetes
Container Service (AKS) Engine
Serverless AWS Lambda Azure Functions Google Cloud
Functions Functions
Database services
Storage services:
Services AWS Azure GCP
Object Storage Amazon Simple Storage Blob Storage Google Cloud Storage
Service
Virtual Amazon Elastic Block Managed Disks Google Compute Engine Persistent
Server Disks Store Disks
Cold Storage Amazon Glacier Azure Archive Blob Google Cloud Storage Nearline
Storage
RESULT:
Thus the Comparison of Cloud cost for a simple web application across AWS, Azure and GCP is
studied.
As for a real-time example, consider a small startup that develops a basic blogging platform. They need a cloud
provider to host their web application, which consists of a single VM instance running their website, storing
user data, and handling data transfer for user interactions. when comparing the cost of hosting a simple web
application across AWS, Azure, and GCP, we considered factors like virtual machine instance, storage, and data
transfer costs. After evaluating the costs for each component, GCP emerged as the most cost-effective option
for our scenario. For instance, for a basic web application comprising one VM instance, 10 GB of storage, and
100 GB of monthly data transfer, GCP offered the lowest total monthly cost compared to AWS and Azure. This
suggests that GCP could be the optimal choice for hosting simple web applications with similar requirements.
VIVA QUESTIONS:
1. What are the main things we looked at when comparing costs between AWS, Azure, and GCP for
our web app?
Compare AWS, Azure, and GCP based on compute costs, storage and data transfer fees, and managed services.
Consider pricing models (pay-as-you-go, reserved, spot) and support plans. Factor in region-specific pricing and
free tier options for cost efficiency.
2. How did we decide which cloud provider to use for hosting our web app?
We chose the cloud provider based on cost, reliability, and features. We considered scalability and region
availability. Support and integration with existing tools were also key factors.
3. What did we consider when comparing how much storage would cost on each platform?
We considered storage type (object, file, block), data transfer fees, scalability, and pricing models (pay-as-you-
go, reserved). Additionally, we evaluated regional pricing differences and backup/archival storage costs.
4. How did we figure out how much it would cost to transfer data in and out of the cloud?
We checked the data transfer pricing for inbound and outbound traffic on each platform. We also considered
regional transfer costs, CDN usage, and data egress fees for moving data across different regions or outside the
cloud.
5. Which cloud provider turned out to be the best choice for our web app, and why?
The best cloud provider for our web app was AWS due to its cost-effectiveness, reliable performance, and scalable
services. It offered the best pricing for compute, storage, and data transfer, along with robust managed services and
strong support options.