Kinds of storage

Objects in a bucket, a disk for one server, a folder for many

Amazon S3object storagewhole objects in a bucket,reached over the web by a keybackups, media, data lakes,static websitesAmazon EBSblock storagea disk attached to oneEC2 instanceboot volumes, databasesyou run yourselfAmazon EFS and FSxfile storagea shared folder that manyinstances mount at onceshared content, home folders,Windows file shares (FSx)Object, block or file: the exam names the need and you name the kind.S3 stores any amount of data as objects and is not a disk: nothing boots from it. EBS is a disk for one instance.EFS is a shared Linux file system that grows by itself; FSx is the same idea for Windows and other file systems.Clue words: "shared by many instances" is file; "attached to an instance" is block; "unlimited", "by URL" is object.

S3 is object storage, EBS is block storage, EFS and FSx are file storage.

Kinds of storage · Going deeper

Clue words for storage

When the question saysThe service isBecause it"any amount of data, reached over the web"Amazon S3object storage"a disk for one EC2 instance"Amazon EBSblock storage"shared files for many Linux instances"Amazon EFSelastic NFS file system"Windows file shares", "Lustre"Amazon FSxmanaged third-party file systems"on-premises applications store data in AWS"AWS Storage Gatewayhybrid storage"one place to schedule and audit backups"AWS Backupcentral backup service"cheapest storage for long-term archives"S3 Glacier Deep Archivelowest price, slow retrieval"recover servers quickly in another Region"AWS Elastic Disaster Recoveryreplicates servers continuouslyEight storage clues. The hybrid one, Storage Gateway, is the one most often missed.

Eight storage services, eight clue phrases.

S3 storage classes

The less often you read it, the less it costs to keep

Storage classPrice to store 1 GB for a monthGetting it backUse it forS3 Standard$0.023millisecondsdata in active useS3 Standard-IA$0.0125millisecondsbackups read monthlyS3 One Zone-IA$0.01millisecondscopies you could re-createS3 Glacier Instant Retrieval$0.004millisecondsarchives read quarterlyS3 Glacier Flexible Retrieval$0.0036minutes to hoursarchives read yearlyS3 Glacier Deep Archive$0.00099within 12 hoursrecords kept 7 to 10 yearsexample list prices, US East, 2025Colder classes cost less to store and more, or longer, to read back.Deep Archive stores a gigabyte for about a twenty-third of the Standard price. The infrequent-access and Glacierclasses add a retrieval fee and a minimum storage time. If access patterns are unknown, S3 Intelligent-Tieringmoves each object between tiers for you.

Colder classes are cheaper to store and slower or dearer to read.

S3 storage classes · Going deeper

What else S3 does

Durability99.999999999% (eleven nines): objects are copied across at least three Availability ZonesOne Zone-IAthe exception: one Availability Zone only, so it is cheaper and less resilientVersioningkeeps every version of an object, so an overwrite or delete can be undoneLifecycle rulesmove objects to a colder class, or delete them, after a number of daysReplicationcopies objects to a bucket in another Region or accountBlock Public Accesson by default: a bucket is private until you say otherwiseStatic website hostingserves HTML, CSS and images straight from a bucketDurability is about not losing data. Availability is about reaching it right now.S3 Standard is designed for eleven nines of durability and 99.99% availability.

Eleven nines of durability, versioning, lifecycle rules, replication.

Disks for EC2

Inside the host, attached to one instance, or shared on the network

Instance storea disk inside the host machinevery fast and included in the pricelost when the instance stopsAmazon EBSone Availability Zonea network disk for one instanceoutlives the instancesnapshots are stored in S3Amazon EFSa file system on the networkmany instances, several zonesgrows and shrinks by itselfAsk what the storage is attached to: the host, one instance, or the network.Instance store is for temporary data such as caches. EBS is the normal disk of an EC2 instance and stays in oneAvailability Zone; a snapshot is how it is backed up or copied elsewhere. EFS is the answer when severalinstances must read and write the same files at the same time.

Instance store is temporary. EBS persists for one instance. EFS is shared by many.

Check yourself

stored10 yearsread: almost never

Compliance records must be kept for ten years and are almost never read. Waiting a day for one is acceptable. Which S3 storage class costs least?

Managed databases

AWS does the patching, backups and failover

Where the database runsWho does the workHow much you manageA database on EC2you install, patch, back up, replicate and scale itAmazon RDSAWS patches, backs up and fails over; you pick the engine and sizeAmazon Aurorathe same, plus storage that grows itself: six copies in three zonesAmazon DynamoDBno servers and no versions; you create tablesbars are relative, not measuredA managed database hands the patching, backups and failover to AWS.The exam asks you to "decide when to use EC2-hosted databases or AWS managed databases". Choose EC2 only whenyou need control of the operating system or an engine that RDS does not offer. Otherwise the managed serviceis the answer, and "least operational overhead" points to it.

Use a managed database unless you need control of the operating system.

Choosing a database

The shape of the data decides

When the data isThe service isBecause it isrows and columns, SQL, joinsAmazon RDSmanaged MySQL, PostgreSQL, Oracle, SQL Server and morerelational, at higher scale and availabilityAmazon AuroraMySQL- and PostgreSQL-compatible, built by AWSkey and value, any scale, millisecondsAmazon DynamoDBserverless NoSQLJSON documents, MongoDB workloadsAmazon DocumentDBdocument databaserelationships: social graphs, fraud ringsAmazon Neptunegraph databaseanswers needed in microsecondsAmazon ElastiCachein-memory cache in front of a databaseyears of history, for analysisAmazon Redshiftdata warehouse (next lesson)Read the shape of the data and the database follows.Relational means tables with fixed columns and SQL: RDS or Aurora. Everything else on this page is "NoSQL" orpurpose-built. DynamoDB is the default NoSQL answer; the words "document", "graph" and "in-memory" eachpoint to one other service.

Relational: RDS or Aurora. Key-value: DynamoDB. Document, graph, in-memory: one service each.

RDS availability

A standby keeps it up; a replica makes it faster

Applicationreads and writesAvailability Zone APrimaryAvailability Zone BStandbynot readable;takes over on failuresynchronousAny zone or RegionRead replicareadable;takes read trafficasynchronous copyMulti-AZ is for availability. A read replica is for performance.A Multi-AZ deployment keeps a standby in a second Availability Zone and fails over to it automatically; it doesnot make the database faster. A read replica is a copy you can query, so it spreads read traffic; it is not anautomatic failover. The exam offers each as the wrong answer for the other.

Multi-AZ is for availability. Read replicas are for read performance.

Check yourself

Zone AZone B?

A relational database must keep working if its Availability Zone fails, with no manual steps. Which feature provides this?

Database migration

One tool copies the data, another converts the schema

Same engineDifferent engineMySQL on premisesAWS DMScopies the dataAmazon RDS for MySQLOracle on premisesAWS SCTconverts the schemaAWS DMScopies the dataAurora PostgreSQLDMS moves the data. SCT converts the schema when the engine changes.AWS Database Migration Service copies a database into AWS while the source stays in use, then keeps the two instep until you switch over. If the target engine is different, the AWS Schema Conversion Tool first rewritesthe tables and stored code. These are the "database migration tools" named in task 3.4.

AWS DMS migrates the data. AWS SCT converts the schema between different engines.

Check yourself

?the same files

Twelve EC2 instances in three Availability Zones must read and write the same set of files at the same time. Which storage fits?

Lesson complete

You finished “Storage and databases on AWS”

Answer the questions along the way to see your score here.

Open in a new tab