AWS Builder Center
Day 4: AWS Storage and Databases

Day 4: AWS Storage and Databases

Exam domain covered today: Domain 3, Cloud Technology and Services (34%).

What you will learn today

  • Amazon S3, S3 storage classes, and S3 Glacier
  • EBS, EFS, and FSx
  • Hybrid storage and data transfer (Storage Gateway, DataSync, Snow Family)
  • RDS, Aurora, DynamoDB, ElastiCache, and Redshift
  • Other purpose-built databases
  • Database selection concepts

PART A: STORAGE

1. The three types of storage

1
2
3
4
5
6
7
OBJECT storage BLOCK storage FILE storage
(files as objects (raw disk volumes, (shared folders,
+ metadata, via attach to a server) many servers at once)
HTTP/API)
| | |
Amazon S3 Amazon EBS Amazon EFS
S3 Glacier EC2 Instance Store Amazon FSx
TypeHow data is storedBest forAWS serviceAnalogy
ObjectObjects with metadata in buckets, accessed via URL/APIImages, backups, logs, static websites, data lakesS3A giant warehouse where each box has a label
BlockFixed-size blocks, like a hard driveOperating systems, databases needing low latencyEBSA hard drive plugged into your computer
FileFiles and folders in a hierarchyShared content, home directoriesEFS, FSxA shared network drive in an office

2. Amazon S3 (Simple Storage Service)

S3 is object storage with virtually unlimited capacity, designed for 99.999999999% (11 nines) durability. Data is stored redundantly across at least three AZs in a Region (except One Zone classes).
ConceptDetail
BucketContainer for objects. Name must be globally unique; created in a specific Region
ObjectFile plus metadata, identified by a key (its name/path)
Object size0 bytes up to 5 TB per object (use multipart upload for large files)
AccessConsole, CLI, SDK, REST API, pre-signed URLs
ConsistencyStrong read-after-write consistency
Use casesBackup and restore, static website hosting, data lakes, media, archives, software delivery

S3 storage classes (very commonly tested)

1
2
3
4
5
6
Access frequency HIGH ---------------------------------------------> LOW
Cost per GB HIGH ---------------------------------------------> LOW
Retrieval speed instant ........................................... hours

[ S3 Standard ] [ Intelligent-Tiering ] [ Standard-IA ] [ One Zone-IA ]
[ Glacier Instant ] [ Glacier Flexible ] [ Glacier Deep Archive ]
ClassDesigned forAvailability zonesRetrievalMinimum storage durationRemember
S3 StandardFrequently accessed data3+ AZsMillisecondsNoneDefault, "hot" data
S3 Intelligent-TieringUnknown or changing access patterns3+ AZsMilliseconds (frequent/infrequent/archive-instant tiers)NoneAutomatic cost savings, no retrieval fees
S3 Standard-IA (Infrequent Access)Long-lived data accessed less often but needs rapid access3+ AZsMilliseconds30 daysCheaper storage, retrieval fee
S3 One Zone-IAInfrequently accessed, re-creatable data1 AZMilliseconds30 daysCheapest IA, data lost if the AZ is destroyed
S3 Glacier Instant RetrievalArchive needing millisecond access (quarterly access)3+ AZsMilliseconds90 daysArchive with instant access
S3 Glacier Flexible RetrievalArchive, rarely accessed3+ AZsMinutes to hours (expedited 1-5 min, standard 3-5 hrs, bulk 5-12 hrs)90 daysLow-cost archive
S3 Glacier Deep ArchiveLong-term retention (7 to 10+ years), compliance3+ AZs12 hours (standard) to 48 hours (bulk)180 daysLowest cost
S3 Express One ZoneLatency-critical, high-performance single-digit ms workloads1 AZConsistent single-digit msNoneFastest S3
Exam clue: "Unknown or changing access pattern" = Intelligent-Tiering. "Cheapest, archive, 12 hours retrieval acceptable" = Glacier Deep Archive. "Infrequent but needs fast access, can't recreate" = Standard-IA. "Infrequent and can re-create" = One Zone-IA.

Key S3 features

FeatureWhat it does
VersioningKeep multiple versions of an object; protects against accidental deletes and overwrites
Lifecycle policiesAutomatically transition objects between classes or expire (delete) them after a time
Cross-Region Replication (CRR) / Same-Region Replication (SRR)Automatically copy objects to another bucket (needs versioning)
EncryptionSSE-S3 (S3-managed keys, default for new objects), SSE-KMS, SSE-C, client-side
Block Public AccessAccount/bucket-level setting to prevent accidental public exposure
Bucket policies, IAM, ACLsControl access (prefer policies; ACLs are legacy)
Pre-signed URLsTime-limited access to a private object
Static website hostingServe HTML, CSS, JS directly from a bucket
S3 Transfer AccelerationFaster uploads from far away using CloudFront edge locations
Multipart uploadUpload large objects in parts (recommended over 100 MB, required above 5 GB)
S3 Object LockWORM (write once, read many); prevents deletion for a retention period (compliance)
S3 Glacier Vault LockWORM policy for Glacier vaults
MFA DeleteRequire MFA to permanently delete versions
S3 Event NotificationsTrigger Lambda, SQS, SNS when objects change
S3 Access Points / Storage LensSimplify access management / analytics and visibility
Requester PaysThe requester pays data transfer, not the bucket owner
1
2
Lifecycle example:
Day 0: S3 Standard --30 days--> Standard-IA --90 days--> Glacier Flexible --365 days--> Delete
S3 pricing dimensions: storage per GB, requests (PUT, GET), data transfer out to the internet, retrieval fees (IA and Glacier), management features. Data transfer IN is free.
Analogy: S3 is a limitless warehouse. Standard is the front shelf, Standard-IA is the back shelf, Glacier is the basement archive, and Deep Archive is the off-site vault.

3. Block storage: Amazon EBS and instance store

Amazon EBSEC2 Instance Store
PersistencePersistent; survives stop and startTemporary; lost on stop or terminate
Attached toOne EC2 instance at a time (most volumes) in the same AZPhysical host of the instance
PerformanceGood to very high (SSD or HDD)Very high I/O
BackupsSnapshots stored in S3 (incremental)None
Best forBoot volumes, databasesCaches, scratch data, buffers
EBS volume types
CategoryTypesUse
General purpose SSDgp3, gp2Most workloads, boot volumes
Provisioned IOPS SSDio2, io1Critical, I/O-intensive databases
Throughput optimized HDDst1Big data, streaming, log processing
Cold HDDsc1Infrequently accessed, lowest cost
EBS featureDetail
SnapshotsPoint-in-time backups; can copy across Regions; restore to new volumes
EncryptionKMS-based, applies to volume, snapshots, and data in transit to the instance
AZ-boundTo move to another AZ or Region, snapshot then restore
Elastic VolumesChange size or type without detaching
Data Lifecycle ManagerAutomate snapshot creation and retention
Exam trap: EBS lives in one AZ. S3 lives across multiple AZs. EFS is multi-AZ.

4. File storage: EFS and FSx

ServiceDescriptionOSKey points
Amazon EFS (Elastic File System)Fully managed, elastic NFS file systemLinuxMounted by thousands of instances at once, across AZs; grows and shrinks automatically; pay for what you use; Standard and Infrequent Access classes
Amazon FSx for Windows File ServerManaged Windows file shares (SMB)WindowsActive Directory integration
Amazon FSx for LustreHigh-performance file systemLinuxHPC, machine learning, integrates with S3
Amazon FSx for NetApp ONTAPNetApp features in AWSMulti-protocolLift-and-shift NetApp users
Amazon FSx for OpenZFSManaged OpenZFSLinux/UnixMigrate ZFS workloads
EBS vs EFS vs S3 vs Instance Store
FeatureS3EBSEFSInstance Store
TypeObjectBlockFile (NFS)Block (ephemeral)
Shared by many serversYes (via API)No (one instance)YesNo
Multi-AZYesNo (single AZ)YesNo
PersistentYesYesYesNo
Scales automaticallyYesManual resizeYesNo
Typical useBackups, static contentBoot disk, DBShared Linux filesTemporary cache
1
2
3
4
5
6
7
8
Which storage?
Store images/backups/website files .............. S3
Disk for ONE EC2 instance / database ............ EBS
Shared Linux file system for MANY instances ..... EFS
Windows file shares (SMB) ....................... FSx for Windows
HPC / ML high-speed file system ................. FSx for Lustre
Very fast temporary scratch space ............... Instance Store
Cheap long-term archive ......................... S3 Glacier

5. Hybrid storage, backup, and data transfer

ServicePurposeExam hook
AWS Storage GatewayHybrid storage connecting on-premises to cloud (File, Volume, Tape gateways)"On-premises app needs cloud storage", "replace tapes"
AWS BackupCentralized, policy-based backup across AWS services"Centrally manage backups"
AWS Elastic Disaster RecoveryRecover servers quickly to AWS"Disaster recovery for servers"
AWS DataSyncOnline transfer of large datasets between on-premises and AWS storage (S3, EFS, FSx)"Automate online data transfer"
AWS Transfer FamilySFTP, FTPS, FTP into S3 or EFS"Existing SFTP workflows"
AWS Snow FamilyPhysical devices for offline data transfer and edge compute"Network too slow, move terabytes to petabytes"
Snow Family quick guide
DeviceCapacity (approx.)Use
SnowconeSmall (up to 8 TB HDD, 14 TB SSD)Edge computing, small transfers, portable
Snowball Edge (Storage or Compute optimized)Tens of TB per deviceLarge migrations, edge processing
SnowmobileUp to 100 PB, a shipping container on a truckExabyte-scale migrations
Availability of individual Snow devices changes over time, but the exam concept is the same: offline physical transfer when networks are too slow or too costly.
1
2
3
4
5
Moving data to AWS?
Enough bandwidth, ongoing ......... DataSync (or Direct Connect)
Very large, slow network .......... Snowball / Snowmobile
Legacy SFTP clients ............... Transfer Family
On-premises app, cloud-backed ..... Storage Gateway

PART B: DATABASES

6. Database types at a glance

1
2
3
4
5
RELATIONAL (SQL) NoSQL Other purpose-built
tables, rows, joins key-value, document, in-memory, graph, ledger,
wide-column time-series, warehouse
RDS, Aurora DynamoDB, DocumentDB, ElastiCache, Neptune,
Keyspaces QLDB, Timestream, Redshift
RelationalNoSQL
StructureFixed schema, tablesFlexible schema
QuerySQL with joinsKey-based or document queries
ScalingVertical (plus read replicas)Horizontal at massive scale
UseTransactions, ERP, CRMMobile, gaming, IoT, high-scale web

7. Amazon RDS (Relational Database Service)

RDS is a managed relational database service. AWS handles hardware, OS patching, database software patching, backups, and failover. You manage the data, schema, queries, and access.
Engines supportedNotes
MySQL, PostgreSQL, MariaDBOpen source engines
Oracle, Microsoft SQL ServerCommercial engines (license options)
Amazon AuroraAWS's cloud-native engine (MySQL and PostgreSQL compatible)
Db2Also supported
FeaturePurposeExam hook
Multi-AZ deploymentSynchronous standby copy in another AZ; automatic failoverHigh availability, disaster recovery
Read ReplicasAsynchronous copies used to offload read traffic (can be cross-Region)Performance, read scaling
Automated backupsDaily snapshots plus transaction logs, point-in-time restore (retention up to 35 days)Recovery
Manual snapshotsYou create; kept until you deleteLong-term backup
EncryptionAt rest with KMS, in transit with SSL/TLSSecurity
RDS ProxyPooled connections to protect the databaseLambda to RDS scaling
Storage auto scalingGrows storage automaticallyOperations
Exam trap: Multi-AZ = availability (standby, not used for reads). Read replicas = performance (used for reads). You cannot SSH into RDS instances because AWS manages the OS.

RDS vs running a database on EC2

RDSDatabase on EC2
OS and DB patchingAWSYou
Backups and failoverBuilt inYou build them
OS-level accessNoYes
Best whenYou want less operations workYou need full control

8. Amazon Aurora

FeatureDetail
CompatibilityMySQL and PostgreSQL
PerformanceUp to 5x MySQL and 3x PostgreSQL throughput (AWS claims)
StorageAutomatically grows up to 128 TiB; six copies across three AZs
ReplicasUp to 15 read replicas with low lag
AvailabilityFast failover, self-healing storage
Aurora ServerlessAutomatically scales capacity up and down; pay per use
Aurora Global DatabaseCross-Region replication for low-latency global reads and disaster recovery
CostRoughly 1/10th the cost of commercial databases (AWS claim)

9. Amazon DynamoDB

DynamoDB is a fully managed, serverless NoSQL key-value and document database with single-digit millisecond performance at any scale.
FeatureDetail
Data modelTables, items, attributes; primary key (partition key, optional sort key)
Capacity modesOn-demand (pay per request, auto scaling) or provisioned (set read/write capacity)
Global TablesMulti-Region, multi-active replication
DAX (DynamoDB Accelerator)In-memory cache giving microsecond reads
DynamoDB StreamsCapture item changes (trigger Lambda)
TTLAutomatically expire items
BackupOn-demand backups and point-in-time recovery
AvailabilityData replicated across 3 AZs
SecurityEncryption at rest, IAM, fine-grained access
Analogy: DynamoDB is a giant, lightning-fast index-card box: you find a card instantly by its label, no matter how many cards exist.

10. Amazon ElastiCache and MemoryDB

ServiceDescriptionUse
Amazon ElastiCacheManaged in-memory cache with Redis OSS / Valkey and Memcached enginesReduce database load, session stores, leaderboards, sub-millisecond reads
Amazon MemoryDBRedis-compatible, durable in-memory primary databaseWhen you need a durable in-memory database
Analogy: ElastiCache is a sticky note on your monitor: instant answers for things you need constantly, without walking to the filing cabinet (database).

11. Amazon Redshift (data warehouse)

FeatureDetail
PurposeData warehouse for analytics and BI on structured data (OLAP)
ScalePetabytes of data, columnar storage, massively parallel processing
SQLStandard SQL, works with BI tools such as QuickSight
Redshift SpectrumQuery data directly in S3
Redshift ServerlessNo cluster management
OLTPOLAP
Many small transactions (orders, payments)Complex analytical queries over large data
RDS, Aurora, DynamoDBRedshift

12. Other purpose-built databases

ServiceTypeBest forExam keyword
Amazon DocumentDBDocument (MongoDB compatible)JSON documents, content management"MongoDB"
Amazon NeptuneGraphSocial networks, fraud detection, knowledge graphs"Relationships", "graph"
Amazon KeyspacesWide-column (Apache Cassandra compatible)Cassandra workloads"Cassandra"
Amazon QLDBLedger (immutable, cryptographically verifiable)Transaction history; AWS has announced it is being retired, so learn the concept but expect it less"Immutable ledger"
Amazon TimestreamTime-seriesIoT, application metrics"Time series"
Amazon OpenSearch ServiceSearch and log analyticsSearch engines, log analysis"Search"
AWS Database Migration Service (DMS)Migrate databases with minimal downtimeHomogeneous and heterogeneous migrations"Migrate a database"
AWS Schema Conversion Tool (SCT)Convert schemas between enginesOracle to PostgreSQL"Convert schema"

13. Database selection flowchart

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
What does the workload need?
|
Relational, SQL, joins, transactions? ----yes----> RDS or Aurora
| (Aurora for high performance / cloud-native)
no
|
Massive scale, key-value, millisecond latency, serverless? --yes--> DynamoDB
|
Reduce database load / caching / sub-millisecond reads? ----yes--> ElastiCache (DAX for DynamoDB)
|
Large-scale analytics / data warehouse / BI? ----------------yes--> Redshift
|
Relationships / graph? ---------------------------------------yes--> Neptune
|
MongoDB-compatible documents? -------------------------------yes--> DocumentDB
|
Time-series / IoT metrics? ----------------------------------yes--> Timestream
|
Full-text search / log search? -------------------------------yes--> OpenSearch Service
|
Query files in S3 with SQL, no servers? ---------------------yes--> Athena (Day 6)
RequirementChoose
Managed relational databaseRDS
5x faster than MySQL, cloud-native, 15 replicasAurora
Serverless NoSQLDynamoDB
In-memory cacheElastiCache
Data warehouseRedshift
GraphNeptune
MongoDBDocumentDB
Migrate databasesDMS
Run a custom or unsupported database with OS accessEC2 with your own database

14. Exam traps for Day 4

TrapCorrect thinking
EBS is multi-AZEBS volumes live in one AZ
Instance store is persistentNot persistent; lost when instance stops/terminates
S3 Glacier is a separate product from S3It is a set of S3 storage classes
S3 bucket names are Region-uniqueThey are globally unique
Multi-AZ RDS improves read performanceNo, use read replicas
DynamoDB needs serversServerless, fully managed
Redshift is for transactionsIt is for analytics
EFS works with WindowsEFS is for Linux; use FSx for Windows
DataSync and Snowball are the sameDataSync = online; Snow = offline physical
Data transfer into S3 is chargedData in is free; data out is charged

15. Key takeaways

  • S3 = object, EBS = block (one instance, one AZ), EFS = shared Linux files, FSx = specialized file systems.
  • Memorize the S3 classes: Standard, Intelligent-Tiering, Standard-IA, One Zone-IA, Glacier Instant, Glacier Flexible, Glacier Deep Archive.
  • RDS/Aurora = relational. DynamoDB = serverless NoSQL. ElastiCache = cache. Redshift = warehouse.
  • Multi-AZ = availability. Read replicas = performance.

16. Day 4 practice questions

#QuestionAnswer
1Which S3 class suits rarely accessed data kept 10 years at the lowest cost?S3 Glacier Deep Archive
2Which storage can be shared by many Linux EC2 instances in multiple AZs?Amazon EFS
3Which service is a serverless NoSQL database?Amazon DynamoDB
4Which storage is lost when an EC2 instance is stopped?EC2 Instance Store
5Which service is a data warehouse?Amazon Redshift
6Which S3 class automatically moves objects between access tiers?S3 Intelligent-Tiering
7Which RDS feature provides automatic failover to another AZ?Multi-AZ deployment
8Which RDS feature helps scale read-heavy workloads?Read replicas
9Which service reduces database load by caching in memory?Amazon ElastiCache
10Which service transfers petabytes offline when bandwidth is limited?AWS Snow Family
11Which S3 feature makes objects immutable (WORM)?S3 Object Lock
12Which service gives on-premises applications cloud-backed storage?AWS Storage Gateway
13Which AWS database is MySQL and PostgreSQL compatible with up to 15 read replicas?Amazon Aurora
Up next on Day 5: Networking, Content Delivery and Serverless Architecture.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article