Lesson 16 of 36 · see all lessons
  1. Start here: cloud concepts (domain 1, 24%)

    1. 1. Start here: the exam, the plan and what you already know
    2. 2. What the cloud is: benefits, service models and deployment models
    3. 3. AWS global infrastructure: Regions, Availability Zones and edge locations
    4. 4. Cloud economics: what you pay for on-premises vs in the cloud
    5. 5. The AWS Well-Architected Framework: six pillars
    6. 6. Moving to AWS: the Cloud Adoption Framework and migration strategies
  2. Security and identity (domain 2, 30%)

    1. 7. The shared responsibility model: who secures what
    2. 8. IAM basics: users, groups, roles and policies
    3. 9. Protecting the root user, MFA and credentials
    4. 10. Identity at scale: IAM Identity Center, federation and cross-account access
    5. 11. Encryption and keys: protecting data at rest and in transit
    6. 12. Threat protection: Shield, WAF, GuardDuty, Inspector and Security Hub
  3. Governance, ways of working and compute (domains 2 and 3)

    1. 13. Logging, auditing and compliance: CloudWatch, CloudTrail, Config and Artifact
    2. 14. Governing many accounts: Organizations, Control Tower and Service Catalog
    3. 15. Ways to use AWS: console, CLI, SDKs and infrastructure as code
    4. 16. Amazon EC2: virtual servers and instance types
    5. 17. Elasticity: Auto Scaling and Elastic Load Balancing
    6. 18. Containers and serverless: ECS, EKS, Fargate, Lambda and more
  4. Storage, databases and networking (domain 3, 34%)

    1. 19. Block and file storage: EBS, instance store, EFS and FSx
    2. 20. Amazon S3: buckets, storage classes and lifecycle policies
    3. 21. Hybrid storage, backup and disaster recovery
    4. 22. Databases: RDS, Aurora, DynamoDB, ElastiCache and more
    5. 23. Networking: VPCs, subnets, gateways and security layers
    6. 24. Connecting and delivering: Route 53, CloudFront, VPN and Direct Connect
  5. Analytics, AI, integration and more (domain 3)

    1. 25. Analytics services: Athena, Glue, Kinesis, Redshift and Quick
    2. 26. AI and machine learning services: SageMaker AI, Lex, Rekognition and Amazon Q
    3. 27. App integration and business apps: SQS, SNS, EventBridge, Connect and SES
    4. 28. Developer tools, end-user computing, Amplify and IoT
  6. Billing, pricing and support, then exam practice (domain 4, 12%)

    1. 29. Pricing models: On-Demand, Savings Plans, Reserved, Spot and Dedicated
    2. 30. Billing and cost tools: Budgets, Cost Explorer, Pricing Calculator and tags
    3. 31. AWS Support plans, Trusted Advisor and where to get help
    4. 32. Final review and exam day: every decision on one page
    5. 33. Mock exam 1
    6. 34. Mock exam 2 Exam Pack · $12
  7. Extra practice: mock exams 3 and 4

    1. 35. Mock exam 3 Exam Pack · $12
    2. 36. Mock exam 4 Exam Pack · $12
See the leaderboard

18 min

Amazon EC2: virtual servers and instance types

Explain what an EC2 instance is and pick the right instance family for a workload.

By the end of this lesson you can

  • Explain what an EC2 instance is and what you still manage on it
  • Name the choices you make when you launch an instance
  • Pick the instance family that fits a workload
  • Tell stop from terminate, and EC2 from Amazon Lightsail

From earlier lessons · 1 of 2

Cedar Lane Books must build the same set of servers and networks in a test account and a production account, again and again. Which approach fits best?

Pick one answer.

From earlier lessons · 2 of 2

Under the shared responsibility model, who installs security patches on the operating system of an Amazon EC2 instance?

Pick one answer.

Cedar Lane Books runs its website on one tired server in the back-office room. Its fan is loud, its warranty ended last year, and a new one takes six weeks to arrive. The IT lead wants a server she can have in minutes and hand back when she's done. That's Amazon EC2.

[4]

What an EC2 instance is

Exam depth: know it cold.

Amazon EC2 (Elastic Compute Cloud) gives you virtual servers on demand. Each virtual server is called an instance. You launch as many or as few as you need, and you resize them when demand changes.

EC2 is infrastructure as a service (IaaS): AWS rents you the raw building blocks. AWS runs the buildings, the hardware and the virtualization layer.

You manage the guest operating system, the copy of Linux or Windows on your instance. That includes its updates and security patches, the software you install, and the security group firewall rules.

[14][102]

What you choose when you launch an instance

Exam depth: know it cold.

  • Amazon Machine Image (AMI): a template holding the operating system and software for the server. You must pick one. AWS, Marketplace sellers or your own team provide them.
  • Instance type: how much CPU, memory, storage and network the server gets.
  • Key pair: a public key on the instance and a private key you keep. It proves who you are when you log in.
  • Network and security group: which network the instance joins, and a virtual firewall for its traffic.
  • Storage: an Amazon EBS volume, a network disk that keeps its data, or instance store, a fast local disk wiped when the instance stops.
  • User data (recognize it): a script that runs when the instance starts, such as "install the web server".

[14][167][168][169][170]

Six choices make one instanceAMI: OS and softwareInstance type: CPU and memoryKey pair: log-in proofEC2 instanceNetwork and security groupStorage: EBS or instance storeUser data: start-up scriptOne AMI can launch manyidentical servers.Instance store data is goneafter a stop.

[14]

Cedar Lane Books has set up one web server with its operating system, shop software and settings exactly right. It wants to launch ten more servers with the same setup. What should it use?

Pick one answer.

[167]

Instance families: match the hardware to the work

Exam depth: know it cold.

An instance type sets the hardware. Types with the same strength form a family.

FamilyStrengthExample workloadsLetters
General purposeA balance of CPU, memory and network.Web servers, code repositories, small and medium databases.M, T
Compute optimizedFast processors.Batch processing, media transcoding, dedicated game servers, scientific modeling.C
Memory optimizedLots of memory for big data sets held in memory.In-memory databases, data analytics, enterprise applications.R, X
Accelerated computingHardware accelerators such as GPUs.Machine learning, graphics processing.P, G, Inf, Trn
Storage optimizedFast local disks for high, sequential reads and writes.High-throughput databases, data processing, data streaming.I, D, H

Decision rule: find the bottleneck word. "CPU-bound" picks compute. "In memory" picks memory. "GPU" or "training models" picks accelerated. "Local storage I/O" picks storage. "Balanced" or no hint picks general purpose.

[171][172][173][174][175][176]

Match

Match each Cedar Lane Books workload to the instance family that fits it.

Pick an item on the left, then its match on the right.

[171][173]

[175]

A retailer runs an in-memory database that keeps hundreds of gigabytes of data in RAM for fast lookups. Which EC2 instance family fits this workload?

Pick one answer.

[171][174]

Picking an instance family: don't buy the race car to deliver groceries. Find the bottleneck first. Picture: Flat vector infographic style, bright colors, clean shapes.

Reading an instance type name

Exam depth: recognize it.

Take m7g.large. Before the dot is the instance family, after it the size.

  • m is the series: general purpose. (c is compute optimized, r memory optimized.)
  • 7 is the generation. Higher is newer.
  • g is an option: AWS Graviton processors. Other options include a for AMD, i for Intel and d for instance store disks.
  • large is the size. Sizes grow through xlarge, 2xlarge and up.

You won't decode options on the exam. Do know that the first letter hints at the family.

[177]

Per-second billing, stop and terminate

Exam depth: know it cold.

On-Demand instances bill per second, with a 60-second minimum, for Linux, Windows and several others. A few operating systems still bill by the hour. You pay only while the instance runs.

Stop shuts the instance down, like switching off a PC. You can start it again later. You stop paying for the instance, but you still pay for its EBS volumes. Data on instance store is lost.

Terminate deletes the instance for good. It can't be started again. By default its root EBS volume is deleted too, while extra EBS volumes are kept.

Rule: "pause and come back" means stop. "Never needed again" means terminate.

[178][179]

Rendering diagram…
You pay for instance time only in the running state. Stopped can start again; terminated can't.

[179]

A first look at how you pay for EC2

Exam depth: recognize it.

Lesson 29 covers these in depth. For now, know the names:

  • On-Demand: pay by the second, no commitment.
  • Savings Plans: commit to a dollar amount per hour for 1 or 3 years, for a lower rate.
  • Reserved Instances: commit to a specific instance setup for 1 or 3 years.
  • Spot Instances: unused EC2 capacity at a deep discount. AWS can take it back.
  • Dedicated Hosts: a whole physical server for you, useful for server-bound software licenses.

[14]

Amazon Lightsail: the simple option

Exam depth: recognize it.

Amazon Lightsail is the easiest way to start a website or small web app on AWS. It bundles virtual private servers (small virtual machines) with storage, managed databases, load balancers and DNS, all for a low, predictable monthly price. You click to launch WordPress, LAMP or a plain operating system.

Decision rule: a small site, little cloud skill, and a fixed monthly bill point to Lightsail. Many instance families, fine-grained control or large scale point to EC2.

[14][180]

A local bakery wants a simple WordPress website on AWS. The owner has no cloud experience and wants a predictable monthly price. Which AWS service fits best?

Pick one answer.

[180]

Try it in the AWS console

  1. Sign in, open the EC2 console, and choose Launch instance.
  2. Give it a name. Under the AMI, pick Amazon Linux marked Free Tier eligible.
  3. Pick an instance type marked Free Tier eligible.
  4. Create a new key pair, keep the default network settings, and choose Launch instance.
  5. Watch the state change from pending to running on the Instances page.
  6. Clean up: choose Instance state, then Terminate (delete) instance.

Terminate it as soon as you're done. A running instance keeps using Free Tier credits or costs money, even when idle.

[181]

Exam-style practice

A games studio needs to host dedicated multiplayer game servers. The servers are limited by processor speed, not memory or disk. Which EC2 instance family should it choose?

Pick one answer.

[173]

A data team runs a workload that needs very high, sequential read and write access to large data sets on local storage. Which EC2 instance family fits best?

Pick one answer.

[175]

Cedar Lane Books uses a test server only on weekdays. It wants to stop paying for the instance at weekends and start the same server again on Monday. What should it do on Friday?

Pick one answer.

[179]

FlashcardsIndex cardsFlashcards ⚡

Card 1 of 17

[14][171][177][178][179][180]

Worth keeping

  1. An EC2 instance is a virtual server; you manage its operating system and patches.
  2. At launch you pick an AMI, instance type, key pair, network and security group, and storage.
  3. Find the bottleneck: CPU is compute, RAM is memory, GPU is accelerated, local disk I/O is storage, balanced is general purpose.
  4. Stop to pause and restart later; terminate to delete for good.
  5. Lightsail is for small, simple sites at a predictable monthly price.

On the job

A finance lead sees an EC2 line on the bill with names like m7g.large and r7i.2xlarge. With this lesson she can read them: a general purpose server and a bigger memory optimized one. She can ask good questions too. Does the test server need to run all weekend, or can it be stopped? Does a quiet internal site really need a memory optimized instance? Those two questions often cut a cloud bill more than any discount.

Cedar Lane's new web server runs well, until Black Friday sends ten times the usual shoppers. One server won't cope, and buying ten for one day is waste. Next lesson: Auto Scaling and load balancers.

Leaderboard

Loading…

50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.

Embed this practice on your site

Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.

Report a copyright problem with this lesson

Sources for this lesson (18)

Each fact in the lesson is marked with the number of the page it comes from.

  1. [4]AWS: CLF-C02 Content Domain 3: Cloud Technology and Services
  2. [14]AWS: What is Amazon EC2?
  3. [102]AWS: Shared Responsibility Model
  4. [167]AWS: Amazon Machine Images in Amazon EC2
  5. [168]AWS: Amazon EC2 key pairs and Amazon EC2 instances
  6. [169]AWS: Run commands when you launch an EC2 instance with user data input
  7. [170]AWS: Instance store temporary block storage for EC2 instances
  8. [171]AWS: Amazon EC2 instance types
  9. [172]AWS: Specifications for Amazon EC2 general purpose instances
  10. [173]AWS: Specifications for Amazon EC2 compute optimized instances
  11. [174]AWS: Specifications for Amazon EC2 memory optimized instances
  12. [175]AWS: Specifications for Amazon EC2 storage optimized instances
  13. [176]AWS: Specifications for Amazon EC2 accelerated computing instances
  14. [177]AWS: Amazon EC2 instance type naming conventions
  15. [178]AWS: Amazon EC2 On-Demand Pricing
  16. [179]AWS: Amazon EC2 instance state changes
  17. [180]AWS: What is Amazon Lightsail?
  18. [181]AWS: Get started with Amazon EC2