DevOps.Academy
CoursesCurriculumInterview prepPricing
◔My learningSign in
DevOps.Academy

Free, hands-on DevOps lessons. Made with care in India.

System status

Learn

All coursesLinux roadmapCurriculumInterview questionsCheat sheetsMy learning

Academy

PricingCertificates

Legal

PrivacyTermsContact

devops.rajeev.pro

AWS for DevOpsLesson 1 of 17
Your progress · 0%
On this page
  1. What "the cloud" actually is
  2. IaaS, PaaS and SaaS
  3. Public, private and hybrid cloud
  4. Regions and Availability Zones
  5. Look around with the AWS CLI
↖ Course roadmap
Lesson 1 · Cloud basics

Cloud basics: what you're actually renting

What the cloud really is, IaaS vs PaaS vs SaaS, public vs private vs hybrid, and how regions and Availability Zones keep apps running.

25 min read · intermediate · hands-on

By the end of this lesson you'll be able to

0 of 4 complete

What "the cloud" actually is

Before cloud services, a team that needed another server raised a purchase request. Someone waited for hardware, installed an operating system, and wired it into the network. A Friday release could wait days for capacity. If traffic dropped later, the paid-for server sat mostly idle. The process was slow because every change depended on a person and a physical machine.

Cloud computing changes that request into an API call. You ask a provider to create a defined resource, such as a virtual server, and the provider allocates it from its data centres. You can change or delete it without handling the hardware. The provider still owns the physical machines; you rent access to a portion of their capacity.

Three properties make that useful:

  • On demand. You create and delete resources yourself, with a click or a command. No tickets, no sales call.
  • Pay for what you use. Most services bill by the second, hour or gigabyte. A server that runs for 20 minutes costs 20 minutes.
  • Elastic. Need 50 servers for a sale weekend and 5 on Monday? Scale up, then scale back down.

That last point is why DevOps and the cloud fit together. If infrastructure is an API call, you can put the request in a script or a reviewed configuration file. A team can repeat the same setup, see who changed it, and remove it when the workload ends. The provider operates the physical facilities, but you still choose the configuration and remain responsible for your data and access.

In this course, you'll use the AWS console and CLI to create a small resource, inspect its region, and learn what to secure before using an account for real work.

IaaS, PaaS and SaaS

Every app sits on the same stack of layers, from the network at the bottom to your code and data at the top. The service model decides where AWS stops and you start.

Who manages what
  1. Data & accessyou
  2. Applicationyou
  3. Runtimeyou
  4. Operating systemyou
  5. VirtualisationAWS
  6. ServersAWS
  7. StorageAWS
  8. NetworkingAWS
You manage AWS manages

EC2: AWS runs the hardware and hypervisor. You run the OS and everything on it.

ModelYou getYou still manageAWS example
IaaSVirtual servers, disks, networksOperating system, runtime, app, dataEC2
PaaSA platform that runs your codeYour app and its dataElastic Beanstalk, App Runner
SaaSA finished productYour data and who can access itAmazon WorkMail, or Gmail and Slack outside AWS

The shared responsibility model. The more managed the service, the smaller your share.© Diagram: DevOps Academy, based on AWS's shared responsibility model

The shared responsibility model. The more managed the service, the smaller your share.© Diagram: DevOps Academy, based on AWS's shared responsibility model
Your data is always your job

AWS calls this the shared responsibility model: AWS secures the cloud itself (buildings, hardware, the hypervisor), and you secure what you put in it. Even with SaaS, a weak password or a public link to private data is on you.

Public, private and hybrid cloud

These names describe who owns or shares the infrastructure, not whether a web page is visible on the internet. A public-cloud account can contain a private database; a private cloud can host a public website.

TypeWhat it meansWhen teams use it
PublicShared provider infrastructure, like AWS, Azure or Google CloudMost new projects. No hardware to buy
PrivateCloud-style tooling on hardware only you use, often in your own data centreStrict rules, or big steady workloads already on owned hardware
HybridSome workloads on-premises, some in the public cloud, connectedMoving to the cloud step by step, or keeping regulated data at home

In this course we use AWS, a public cloud provider. The account and its network controls still let you decide which resources are reachable. Choose a private cloud when control over dedicated hardware or a local environment is a firm requirement and the team can operate it. Choose a hybrid setup when some systems must remain local but still need to communicate with cloud services. A common mistake is to treat "public cloud" as "publicly accessible"; check each resource's network and access policy instead.

Regions and Availability Zones

AWS runs data centres all over the world, grouped in two levels:

  • A Region is a geographic area, like ap-south-1 (Mumbai) or ap-south-2 (Hyderabad). Regions are independent of each other. Your resources stay in the Region you create them in.
  • An Availability Zone (AZ) is one or more data centres inside a Region, with their own power, cooling and network. AZs in a Region are far enough apart that a fire or flood shouldn't hit two at once, but close enough for fast private links between them. Mumbai has three: ap-south-1a, ap-south-1b and ap-south-1c.

What an Availability Zone is made of: rooms full of server racks with their own power and cooling. This one is at CERN; AWS doesn't publish photos from inside its own data centres.© Florian Hirzinger, www.fh-ap.com · CC BY-SA 3.0 · resized · Source ↗

What an Availability Zone is made of: rooms full of server racks with their own power and cooling. This one is at CERN; AWS doesn't publish photos from inside its own data centres.© Florian Hirzinger, www.fh-ap.com · CC BY-SA 3.0 · resized · Source ↗
A Region and its Availability Zones
Users in IndiaLoad balancer
Region · ap-south-1 (Mumbai)
ap-south-1a▣ ▣✓ app serving
ap-south-1b▣ ▣✓ app serving
ap-south-1c▣ ▣spare capacity

The app runs in two AZs. The load balancer spreads requests across both.

The rule that follows: run anything that matters in at least two AZs. If one AZ has a problem, the copy in the other AZ keeps serving users. Most of the high availability you'll build in this course comes from that one idea.

How to pick a Region

  1. Where your users are. Closer means lower latency. Users in India → Mumbai or Hyderabad.
  2. Where the data is allowed to live. Some data must stay in the country by law or by contract.
  3. Which services exist there. New services often reach a few Regions first.
  4. Price. The same server can cost a little more or less depending on the Region.
AWS Global Infrastructure Explained in 3 Minutes: Regions, Availability Zones and Edge LocationsTiny Technical Tutorials · Watch on YouTube ↗

Look around with the AWS CLI

The quickest way to start is AWS CloudShell: a terminal in your browser, opened from the AWS console, with the AWS CLI installed and signed in as you. No keys to create or leak.

$ aws --version
aws-cli/2.x.x Python/3.x Linux/x86_64        # your exact versions will differ
$ aws sts get-caller-identity                # which account and identity am I using?
{
    "UserId": "AIDAEXAMPLEUSERID",
    "Account": "123456789012",
    "Arn": "arn:aws:iam::123456789012:user/rajeev"
}
$ aws ec2 describe-regions --query "Regions[].RegionName" --output text
$ aws ec2 describe-availability-zones --region ap-south-1 --query "AvailabilityZones[].ZoneName" --output text
ap-south-1a	ap-south-1b	ap-south-1c
aws --version
  • awsthe AWS command line
aws ec2 describe-regions --query "Regions[].RegionName" --output text
  • --querypick fields from the JSON response
  • --outputoutput format
aws ec2 describe-availability-zones --region ap-south-1 --query "AvailabilityZones[].ZoneName" --output text
  • --regionwhich Region

--query filters the service response with JMESPath, AWS CLI's query language. Here it selects only the RegionName or ZoneName fields instead of printing the full response object. --output text prints those values as plain text. Without it, the CLI usually formats results as JSON, which is easier to read for nested objects but noisier for a short list.

aws sts get-caller-identity is a useful safety check before a change. It asks AWS Security Token Service which identity signed the request; it does not create or modify a resource. Confirm the account and role before running commands that create, change or delete infrastructure. The example identity above is illustrative, so its account and user values will not match yours.

The final command requests Availability Zones from the selected region. A region name in a command doesn't change your account's default region; pass --region when you need the command to use a specific one. Use CloudShell when you need a signed-in shell without storing keys on your laptop. Use a local CLI when your team manages its credentials safely and wants scripts in its normal development workflow. Never put access keys in a lesson file, shell history or source repository.

Protect the root user first

The email you signed up with is the root user: it can do anything, including closing the account. Turn on MFA for it today, never create access keys for it, and don't use it for daily work. The next lesson sets up a safer identity with IAM.

Set a budget before you build anything

New accounts get free usage and starter credits, but the rules change, so read the current AWS Free Tier page first. Then create a zero-spend budget in Billing → Budgets. It emails you the moment anything starts costing money, which turns a surprise bill into a quick fix.

⌘
Mini mission

Choose a Region for a new app

Your team is launching an app for customers in India. Legal says customer data must stay in India, and the app needs EC2 and RDS. Pick the Region, list its AZs, and prove both services are offered there.

Input: Users in India, data stays in IndiaOutput: ~/region-choice.txt
Reveal one safe solution
$ aws ec2 describe-availability-zones --region ap-south-1 --query "AvailabilityZones[].ZoneName" --output text > ~/region-choice.txt
$ aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/regions/ap-south-1/services --query "Parameters[].Value" --output text | tr '\t' '\n' | grep -x -e ec2 -e rds
ec2
rds
$ cat ~/region-choice.txt
ap-south-1a	ap-south-1b	ap-south-1c
aws ec2 describe-availability-zones --region ap-south-1 --query "AvailabilityZones[].ZoneName" --output text > ~/region-choice.txt
  • awsthe AWS command line
  • --regionwhich Region
  • --querypick fields from the JSON response
  • --outputoutput format
  • >write output to a file, replacing it
aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/regions/ap-south-1/services --query "Parameters[].Value" --output text | tr '\t' '\n' | grep -x -e ec2 -e rds
  • --pathparameter path
  • |pipe: send output to the next command
  • trtranslate or delete characters
  • grepfind lines that match a pattern
  • -xmatch the whole line
  • -ea pattern (repeat for several)
cat ~/region-choice.txt
  • catprint a file

ap-south-1 (Mumbai) fits: it's in India, close to users, has three AZs and offers both services. ap-south-2 (Hyderabad) would also work, and is a good second Region for disaster recovery later.

Try it yourself

0 of 5 steps done

Run each task in your own account or terminal, then tick it off.

Knowledge check

Quick check

Question 1 of 4

Your app runs on one EC2 server in ap-south-1a. That AZ has a power problem and the app goes down. What would have prevented it?

Go deeper

Official reading for this lesson

  • GuideTypes of cloud computing (IaaS, PaaS, SaaS)AWS ↗
  • ToolAWS global infrastructure mapAWS ↗
  • DocsRegions and Availability ZonesAWS Docs ↗
  • GuideShared responsibility modelAWS ↗
  • GuideAWS Well-Architected FrameworkAWS ↗
  • DocsGetting started with AWS CloudShellAWS Docs ↗
  • DocsRoot user best practicesAWS Docs ↗
  • DocsManaging costs with AWS BudgetsAWS Docs ↗
  • GuideAWS Free TierAWS ↗

Or get every quiz answer right and it completes itself.

Something unclear, wrong or out of date in this lesson? Tell me, and I'll fix it.

Next lesson →IAM: who can do what