AWS Tutorial menu

AWS Introduction to Cloud Computing

Cloud computing means using someone else's computers over the internet, and paying only for what you use.

What is Cloud Computing?

Imagine Ali runs an online clothes shop in Karachi. To host his website, he could buy a server, put it in an office, pay for electricity, air conditioning and a backup generator, and fix it when a hard disk fails.

Or he could rent a server from a cloud company. The server sits in a large data centre. Ali opens a web page, clicks a few buttons, and his server is ready in two minutes. When Eid sales bring ten times more visitors, he adds more servers. After Eid, he removes them and stops paying.

That is cloud computing:

  • On demand: you get resources in minutes, not weeks
  • Pay as you go: you pay per hour, per second or per gigabyte
  • Scalable: you can grow or shrink at any time
  • Managed: the provider looks after the buildings, power and hardware

What is AWS?

Amazon Web Services (AWS) is Amazon's cloud platform. It started in 2006 and today offers more than 200 services. Other big cloud providers are Microsoft Azure and Google Cloud, but AWS is the largest, so it is a great place to start.

Types of Cloud Service

Cloud services are often put into three groups:

TypeYou manageExample
IaaS (Infrastructure as a Service)The operating system, software and dataAWS EC2 virtual servers
PaaS (Platform as a Service)Only your code and dataAWS Elastic Beanstalk, AWS Lambda
SaaS (Software as a Service)Nothing, you just use the appGmail, Google Docs

The higher you go, the less work you do yourself, but the less control you have.

Regions and Availability Zones

AWS has data centres all over the world. They are organised like this:

  • A Region is a geographic area, such as ap-south-1 (Mumbai) or me-south-1 (Bahrain)
  • Each region has several Availability Zones (AZs), which are separate data centres a few kilometres apart
  • If one AZ has a power cut, your app can keep running in another AZ

Choose a region close to your users. For users in Pakistan, Mumbai or Bahrain usually gives the fastest response.

You can list regions with the AWS command line tool:

Example

bash
aws ec2 describe-regions --query "Regions[].RegionName" --output text
Output
ap-south-1  eu-north-1  eu-west-3  eu-west-2  eu-west-1  ap-northeast-3  me-south-1  us-east-1  ...

Prices are slightly different in each region. us-east-1 (North Virginia) is often the cheapest and gets new services first.

How You Use AWS

There are three main ways to work with AWS:

  1. AWS Management Console: a website where you click to create and manage services. Best for beginners.
  2. AWS CLI: a command line tool. Good for repeating tasks and scripts.
  3. SDKs: libraries for Python, JavaScript, Java and more, so your own code can use AWS.

The same task in the CLI, for example checking which account you are logged in to:

Example

bash
aws sts get-caller-identity
Output
{
    "UserId": "AIDAEXAMPLE1234567890",
    "Account": "123456789012",
    "Arn": "arn:aws:iam::123456789012:user/ayesha"
}

The Shared Responsibility Model

Security in the cloud is shared:

  • AWS is responsible for security OF the cloud: buildings, hardware, network cables
  • You are responsible for security IN the cloud: your passwords, user permissions, data and software updates

Many cloud accidents happen because a customer left a storage bucket public or shared a password, not because AWS was hacked.

Exercise

Exercise

Ali rents a virtual server from AWS and installs his own operating system and software on it. Which type of cloud service is this?

Learn AWS with a teacher

Join the CIT (Computer Information Technology) course at Workownix, online or in Orangi Town, Karachi, and get a certificate.

See the course Ask on WhatsApp