Cloud Certifications: AWS, Azure and Kubernetes · Course book
Chapter 1: Cloud Fundamentals on AWS
Cloud computing is now the default way to run software, and Amazon Web Services, AWS, is its largest provider. The AWS Certified Cloud Practitioner certificate is the entry-level qualification: it tests broad understanding rather than deep technical skill, which makes it a good first step for developers, managers and anyone working near technology. This chapter covers the concepts the exam is built on: what the cloud is and why organisations use it, how AWS is organised around the world, the core services, how pricing works, who is responsible for security, and how to keep costs and risks under control.
What cloud computing is
Cloud computing means renting computing resources, such as servers, storage and databases, over the internet, paying only for what you use, instead of buying and running your own hardware. The provider owns the data centres; you request resources in minutes through a website, a command-line tool or an API.
Cloud services come in three broad models, depending on how much the provider manages for you.
| Model | You manage | The provider manages | Example |
|---|---|---|---|
| Infrastructure as a Service (IaaS) | Operating system, software, data | Hardware, networking, data centres | A virtual machine |
| Platform as a Service (PaaS) | Your application and data | Everything underneath, including the operating system | A managed app hosting service |
| Software as a Service (SaaS) | Only your use of it | The whole application | Web-based email |
There are also three deployment models. A public cloud runs everything on a provider such as AWS. A private cloud runs cloud-style infrastructure in an organisation's own data centre. A hybrid approach combines both, often because some data must stay on site for legal or practical reasons.
AWS summarises the benefits as six advantages: trade large up-front capital spending for variable spending; benefit from the provider's massive economies of scale; stop guessing how much capacity you will need; increase speed and agility, since resources appear in minutes; stop spending money running and maintaining data centres; and go global in minutes, by deploying in other parts of the world with a few clicks.
Global infrastructure
AWS is organised in layers. A Region is a separate geographic area, such as one around a particular city, and each region is largely independent of the others. Inside each region are several Availability Zones, one or more physically separate data centres with their own power and networking, close enough together for fast connections but far enough apart that a flood or fire is unlikely to affect two. Spreading an application across zones keeps it running if one zone fails.
Separately, hundreds of edge locations around the world power CloudFront, AWS's content delivery network, which caches copies of files near users so they load quickly. Choosing a region involves four questions: does data need to stay in a particular country for legal reasons, how close is it to your users, are all the services you need available there, and what does it cost, since prices vary slightly between regions.
The core services
AWS offers more than two hundred services, but the exam focuses on a recognisable core.
- Compute. EC2 provides virtual machines. Lambda runs code in response to events without any server to manage, billed by the millisecond, which is called serverless. Elastic Beanstalk deploys applications without hand-building the infrastructure, and ECS and EKS run containers.
- Storage. S3 stores files as objects in buckets, with very high durability, and offers cheaper storage classes such as Glacier for data rarely accessed. EBS provides disks attached to EC2 instances, and EFS provides shared file systems.
- Databases. RDS runs managed relational databases, Aurora is AWS's own high-performance relational engine, and DynamoDB is a fast, fully managed non-relational database.
- Networking. A VPC is your private network in AWS, Route 53 provides DNS, and Elastic Load Balancing spreads traffic across servers.
- Management. CloudFormation creates infrastructure from templates, CloudWatch collects metrics, logs and alarms from every service, and CloudTrail records every action taken in an account, which matters for auditing.
A few cloud architecture ideas run through all of these services. High availability means a system keeps working when a component fails, usually by running in more than one Availability Zone. Scalability means it can grow to handle more load, either by using bigger machines, called scaling up, or more machines, called scaling out. Elasticity means it grows and shrinks automatically with demand, so you pay only for what each hour needs. Fault tolerance goes further than high availability, continuing without any interruption when something breaks. And disaster recovery plans how to restore service after a major event, such as the loss of a whole region, ranging from simple backups that take hours to restore to a full standby copy running in another region.
Many exam questions describe a need and ask which service fits: "store millions of images cheaply and durably" points to S3; "run code only when a file is uploaded" points to Lambda.
Paying for the cloud
EC2 offers several pricing models, and choosing well can cut costs dramatically.
| Model | How it works | Best for |
|---|---|---|
| On-Demand | Pay by the second or hour, no commitment | Short or unpredictable workloads |
| Reserved Instances and Savings Plans | Commit to one or three years for a large discount | Steady workloads that run all the time |
| Spot Instances | Use spare capacity at a deep discount, but AWS can reclaim it at short notice | Batch jobs that can be interrupted |
| Dedicated Hosts | A whole physical server reserved for you | Licensing or compliance requirements |
The arithmetic is worth doing. Take an instance costing 0.10 dollars an hour on demand, and suppose a commitment gives a 40 percent discount. Run continuously, on demand costs 0.10 × 8,760 hours = 876 dollars a year, against 525.60 with the commitment. But the commitment is paid whether the instance runs or not. A month has about 730 hours, so the committed cost is 0.06 × 730 = 43.80 dollars a month. On demand reaches that only after 438 hours, about 60 percent of the month. Below that usage, on demand is cheaper.
Storage and data transfer are priced differently from compute. S3 charges by the gigabyte stored each month, with cheaper classes for data accessed rarely, and for requests. Bringing data into AWS is generally free, while sending data out to the internet is charged by the gigabyte, a cost that surprises many newcomers.
Cost management tools help. The Free Tier lets new accounts try many services at no charge within limits. AWS Budgets sends alerts when spending approaches a threshold. Cost Explorer shows where money goes. The Pricing Calculator estimates costs before you build, and comparing the total cost of ownership of cloud and on-site options is a common exam theme.
Security and responsibility
The shared responsibility model divides security duties. AWS is responsible for security of the cloud: the physical data centres, hardware and the software that runs its services. You are responsible for security in the cloud: your data, who can access it, how your operating systems are patched and how your network rules are set. The split moves with the service: with EC2 you patch the operating system; with Lambda or S3, AWS does.
IAM, Identity and Access Management, controls who can do what. Users, groups and roles receive policies listing allowed actions, following the principle of least privilege: grant only what is needed. The root account created with the AWS account should be protected with multi-factor authentication and never used for everyday work. Other services support security: encryption with keys managed in KMS, a web application firewall, and Shield against floods of malicious traffic.
The Well-Architected Framework sums up good design in pillars: operational excellence, security, reliability, performance efficiency, cost optimisation and, added more recently, sustainability. Support plans, from Basic to Enterprise, determine how quickly AWS responds when you need help, and the higher tiers add a named technical contact who knows your account.
Check your understanding
- Give an example of IaaS, PaaS and SaaS.
- What is the difference between a Region and an Availability Zone, and why spread an application across zones?
- Which service would you choose to run code only when a file is uploaded? (Answer: Lambda.)
- An instance costs 0.20 dollars an hour on demand. How much is that for a full year? (Answer: 0.20 × 8,760 = 1,752 dollars.)
- With a 30 percent committed discount, how many hours a month must that instance run before committing is cheaper? (Answer: 0.14 × 730 = 102.20 dollars, and 102.20 ÷ 0.20 = 511 hours.)
- Under the shared responsibility model, who patches the operating system of an EC2 instance?
- Why should the root account not be used for everyday work?
This course book is available to read online only at tech-academy.chrysolites.org.