Core lesson 6 of 18Topic: EC2 and EBS: compute and storage
What is Amazon EC2? Instances, AMIs and EBS explained for beginners
Amazon EC2 (Elastic Compute Cloud) provides computing capacity on AWS. This introduction uses a typical virtual-server instance to separate its AMI, instance type, EBS storage and network configuration. An instance in the running state is not, by itself, evidence of a working web application or protected data.
Distinguish an instance, AMI, instance type, EBS and networking, then identify the data and cost checks associated with starting, stopping and terminating an instance.
Know the roles of an OS, process, file, IAM and VPC. This lesson does not connect to AWS, accept keys or credentials, or launch resources.
Separate the source image, compute, storage and network
- AMI → EC2 instanceLaunch from an AMI; the image is not the running process.
- EC2 instance → EBS volumeThis example is EBS-backed. Check retention and termination settings separately.
- EC2 instance → VPC networkingConfigure networking; running state alone does not establish reachability.
- AMI
- The source image containing an OS and applicable software.
- EC2 instance
- Runs processing with the resources of the selected instance type.
- EBS volume
- Stores OS or application data as a separately managed resource.
- VPC networking
- Review subnet, network interface and security-group conditions.
| Term | What it represents | What it does not establish |
|---|---|---|
| Instance | A computing resource | Application health |
| AMI (Amazon Machine Image) | The source OS/software image | That the launched system remains up to date |
| Instance type | A compute, memory and related resource configuration | Whether it meets the application’s performance requirements |
| EBS | Attached block storage | Termination retention or recoverability of required data |
| Security group | Traffic permissions on associated interfaces | An OS listener or application authorization |
Before choosing EC2, separate compute, files, database and networking
Consider an internal app that registers PDFs and lets people find documents by team or title. This example runs the app on EC2 and separates file storage, the database for document records, and network configuration.
- Solid arrow: application request
- Store or retrieve PDFs; query document records.
- Dashed line: network configuration
- The network-configuration relationship between VPC and EC2.
- Request target: App: EC2 → PDFs: S3The app stores or retrieves the PDF files.
- Request target: App: EC2 → Records: RDSThe app queries document records in the database.
- Network configuration: Network: VPC — App: EC2The VPC defines the EC2-side network configuration.
- App: EC2
- In this example, a document-management app on EC2 processes PDF registration and document-record queries.
- PDFs: S3
- Store each PDF as an object.
- Records: RDS
- Use relational tables for document IDs, teams and titles in this example.
- Network: VPC
- Configure the network, routes and traffic conditions for resources.
The preceding EC2 example uses EBS for OS and application storage. This document-management example keeps its PDFs in S3 and its document records in RDS. Review connectivity, access and retention for each.
| Example candidate | Why consider it? | Customer decisions remain |
|---|---|---|
| Typical EC2 virtual server (VM) | You want to manage the guest OS and application processes. | OS/app updates, capacity, data and recovery. |
| Containers on ECS with Fargate | Package the app in containers while AWS manages host infrastructure. | Images, sizing, networking, access and app updates. |
| Lambda Event Functions | Run prepared code (a function) in response to an event, such as a file upload, or an API call. | Function code/libraries, execution conditions, retries and durable storage. |
A container packages an app for execution. Serverless describes infrastructure management; Fargate provides serverless compute for running containers. Managed describes work delegated to a service. RDS provides a managed database rather than a general-purpose host for the web app. This table produces a shortlist. Check execution time, required features, load, related resources and operations under matching requirements. A model name does not prove lowest cost, best performance or security. Review other Lambda primitives or ECS capacity options under their own conditions.
Choose an option to see the result and explanation.
Continue with the role you need
- Read about PDF/object storage:S3 buckets and objects →
- Check database responsibilities:RDS responsibilities →
- Explore network configuration:VPCs, subnets and interfaces →
- Explore container execution:ECS and Fargate responsibilities →
- Compare execution options in detail:EC2 and Lambda comparison →
Establish purpose and ownership before launch
- Define the workload, users, required data and end condition.
- Review the Region, AZ, AMI and instance-type requirements.
- Choose storage and establish retention, deletion and recovery needs.
- Design VPC/subnet/SG settings and guest-OS/application management.
- Review costs, permissions, maintenance ownership and cleanup before an authorized operator proceeds.
Check lifecycle state separately from stored data
| State/action | Meaning | Related checks |
|---|---|---|
| Running | The instance is running | OS, listener, app, access and ongoing charges |
| Normal stop | Stop an instance that can later be started | Retained EBS costs and loss of RAM/instance-store data |
| Reboot | Restart the operating system | Do not treat it as equivalent to stop/start |
| Terminate | Permanently delete the instance | Each volume’s DeleteOnTermination, required data and retained resources |
Data in EBS, instance store and RAM has different lifecycle behavior. A terminated instance cannot be started again. Even when a volume is retained, establish whether all required application data was actually saved there.
Worked example: the instance runs but the report does not open
| Established fact | Next area to investigate |
|---|---|
| The instance is running | Destination address/name, routes and network controls |
| Relevant network conditions are satisfied | Whether the OS/application listens on the expected endpoint |
| The application process runs | Data location, OS permissions and application behavior |
| An S3 read is denied | Caller, action, resource and applicable permissions/controls |
Choose an option to see the result and explanation.
Include storage, communication and cleanup in the cost picture
EC2 compute costs depend on factors such as instance type, Region, purchasing option and runtime. Review EBS, snapshots, IP addresses, transfer and associated services separately. Stopping does not make the whole account free, and termination does not remove every resource.
- Explain the distinct roles of the instance, EBS and AMI.
- List what running state leaves unverified.
- Locate required data and review stop/termination behavior.
- Review complete costs and retained resources across used Regions.
Check, then explain in your own words
- Explain what is launched from an AMI and where processing runs.
- Separate storage, networking and access from instance state.
- Identify data and cost checks for stopping and termination.
Check your understanding: Is having an AMI the same as having a running application?
No. An AMI is a source image, not a running instance or process.
After launch, establish the OS/application state, connectivity, data and access. Source-image information is not evidence of current application behavior.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
- What is Amazon EC2?Checked:
Scope and conditionsEC2 instances are virtual servers. Architecture and operating-system responsibilities depend on the chosen configuration.
Used in this lessonSeparate the source image, compute, storage and network Before choosing EC2, separate compute, files, database and networking
Scope and conditionsData loss and persistence; DeleteOnTermination is evaluated for each EBS volume, not assumed from instance state.
Used in this lessonSeparate the source image, compute, storage and network Check lifecycle state separately from stored data
- AWS shared responsibility modelChecked:
Scope and conditionsResponsibilities vary by selected service and configuration
Used in this lessonEstablish purpose and ownership before launch
- EC2 instance state changesChecked:
Scope and conditionsEBS-backed stop/start, hibernation and termination differ
Used in this lessonCheck lifecycle state separately from stored data
- Amazon EC2 On-Demand pricingChecked:
Scope and conditionsCompute assumptions, OS-specific billing granularity, data transfer and additional resource charges; no unit rates embedded.
Used in this lessonInclude storage, communication and cleanup in the cost picture
- Amazon EBS pricingChecked:
Scope and conditionsProvisioned capacity, additional performance and snapshots; no unit rate or price quote is embedded.
Used in this lessonInclude storage, communication and cleanup in the cost picture
- Amazon VPC pricingChecked:
Scope and conditionsPublic IPv4 and NAT gateway pricing dimensions, including retained/idle addresses; no unit-rate quote.
Used in this lessonInclude storage, communication and cleanup in the cost picture
- Understanding unexpected chargesChecked:
Scope and conditionsResources in all Regions; deletion and data retention need review
Used in this lessonInclude storage, communication and cleanup in the cost picture
- Amazon S3: What is S3?Checked:
Scope and conditionsObject/API access and storage-class distinctions. Documentation review, not live AWS verification.
Used in this lessonBefore choosing EC2, separate compute, files, database and networking
- What is Amazon RDS?Checked:
Scope and conditionsManaged RDS responsibilities versus customer design, not identical features for all engines.
Used in this lessonBefore choosing EC2, separate compute, files, database and networking
- What is Amazon VPC?Checked:
Scope and conditionsVirtual networking; no implicit Internet reachability
Used in this lessonBefore choosing EC2, separate compute, files, database and networking
- Amazon ECS clustersChecked:
Scope and conditionsLogical grouping versus compute; current Fargate, EC2 and Managed Instances options. Documentation review, not live AWS verification.
Used in this lessonBefore choosing EC2, separate compute, files, database and networking
- What is AWS Lambda?Checked:
Scope and conditionsCurrent Event Functions/Web Functions/MicroVMs distinction. Teaching is scoped to default Event Functions, not every compute primitive or extension.
Used in this lessonBefore choosing EC2, separate compute, files, database and networking
Scope and conditionsCustomer maintenance of function code/dependencies and container images; documentation review, not live AWS validation.
Used in this lessonBefore choosing EC2, separate compute, files, database and networking