Your DevOps study space

Real explanations. Videos with tests. Fresh exams every time. Keep the streak alive and watch the XP stack up.

Storage & databases in the cloud · Cloud Docs · StackwisePlanDevOps Storage & databases in the cloud · Cloud Docs · StackwiseCodePython Storage & databases in the cloud · Cloud Docs · StackwiseBuildDocker Storage & databases in the cloud · Cloud Docs · StackwiseTestDevOps Storage & databases in the cloud · Cloud Docs · StackwiseReleaseGit Storage & databases in the cloud · Cloud Docs · StackwiseDeployKubernetes Storage & databases in the cloud · Cloud Docs · StackwiseOperateLinux Storage & databases in the cloud · Cloud Docs · StackwiseMonitorDevOps

Pick a topic

Eight tracks, each with docs, a cheat sheet, videos and tests.

How it works

One loop, repeated until it sticks.

Jump back in

Picked up from where you left off.

Free forever

Your DevOps journey starts with one click.

Sign in with Google or GitHub to open every chapter, video, test and challenge. Your progress is saved wherever you learn.

Storage & databases in the cloud

The AWS chapter introduced object, block and file storage and the difference between availability and durability. This chapter goes deeper: how S3 is organised and secured, which storage class to use, lifecycle rules, backups and snapshots, and how the managed databases (RDS, Aurora and DynamoDB) differ, with the AWS CLI commands you'll use daily.

Block, file and object compared

EBSblock: a diskfor one instancelives in one AZEFSfile: a sharedNFS folder formany instancesS3object: files overan HTTP API, foranything, anywhereEC2EC2EC2EC2apps, browsers, CLI
Ask who needs to read it. One server: EBS. Many servers sharing a folder: EFS. Anything with credentials, including browsers: S3.
EBS (block)EFS (file)S3 (object)
Looks likeA raw disk you format and mountA shared NFS folderObjects reached by an HTTP API
Used byOne EC2 instance at a time (with rare exceptions)Many Linux instances, containers and Lambdas at onceAnything with credentials and network access
ScopeOne availability zoneRegional (across AZs)Regional, data spread across AZs
SizeYou pick a size and pay for all of itGrows and shrinks automaticallyPractically unlimited
Billed forProvisioned GB (plus extra IOPS/throughput if configured)GB actually storedGB stored, requests, data transfer out
Typical useOS disks, databases on EC2Shared uploads folder, content for a fleet of web serversBackups, logs, images, static sites, data lakes

EBS volume types include gp3 (general-purpose SSD, the usual default), io2 (provisioned IOPS for demanding databases) and st1/sc1 (cheaper hard disks for large sequential data). A volume can only attach to instances in its own AZ; to move it, snapshot it and create a new volume elsewhere. You can grow a volume while it's in use (aws ec2 modify-volume --volume-id vol-0123456789abcdef0 --size 30), then extend the partition and filesystem inside the OS (growpart, then xfs_growfs or resize2fs). Volumes can't be shrunk.

S3: buckets, keys and prefixes

  • A bucket is a container created in one region. Its name must be unique across all AWS accounts, 3-63 characters of lowercase letters, numbers, hyphens and dots.
  • An object is a file plus metadata, identified by its key, like images/2026/logo.png. S3 is flat: there are no real folders, and the console just groups keys by the prefix before each /.
  • Objects can be up to 50 TB (raised from 5 TB in late 2025), but a single upload request is limited to 5 GB; larger files use multipart upload, which the AWS CLI does automatically.
  • S3 is strongly consistent: once a write succeeds, every following read sees it.

Storage classes

Each object has a storage class. They trade storage price against retrieval price and speed; the durability design is the same everywhere except the One Zone classes, which keep data in a single AZ.

Class (API name)ForNotes
Standard (STANDARD)Frequently accessed dataThe default; no retrieval fee
Intelligent-Tiering (INTELLIGENT_TIERING)Unknown or changing access patternsMoves objects between tiers automatically for a small per-object monitoring fee
Standard-IA (STANDARD_IA)Infrequent access, needed instantlyCheaper storage, retrieval fee, 30-day minimum
One Zone-IA (ONEZONE_IA)Re-creatable infrequent dataOne AZ only, so data is lost if that AZ is
Glacier Instant Retrieval (GLACIER_IR)Archives read a few times a yearMillisecond access, 90-day minimum
Glacier Flexible Retrieval (GLACIER)ArchivesRestore takes minutes to hours before you can read; 90-day minimum
Glacier Deep Archive (DEEP_ARCHIVE)Long-term compliance archivesCheapest storage; restore takes hours; 180-day minimum

"Minimum" means you pay for at least that many days even if you delete the object sooner. Infrequent-access classes also bill small objects as if they were 128 KB. Check the S3 pricing page for actual prices in your region.

Versioning and lifecycle rules

With versioning on, overwriting an object keeps the old version, and deleting one just adds a delete marker on top, so mistakes and ransomware-style overwrites are recoverable. Once enabled it can only be suspended, never fully turned off, and every old version is billed. Lifecycle rules keep that under control by moving or deleting objects by age:

# lifecycle.json
{
  "Rules": [
    {
      "ID": "logs-archive-then-expire",
      "Filter": { "Prefix": "logs/" },
      "Status": "Enabled",
      "Transitions": [
        { "Days": 30, "StorageClass": "STANDARD_IA" },
        { "Days": 90, "StorageClass": "GLACIER" }
      ],
      "Expiration": { "Days": 365 },
      "NoncurrentVersionExpiration": { "NoncurrentDays": 30 }
    },
    {
      "ID": "clean-up-failed-uploads",
      "Filter": { "Prefix": "" },
      "Status": "Enabled",
      "AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 7 }
    }
  ]
}

$ aws s3api put-bucket-versioning --bucket demee-practice-assets \
    --versioning-configuration Status=Enabled
$ aws s3api put-bucket-lifecycle-configuration --bucket demee-practice-assets \
    --lifecycle-configuration file://lifecycle.json

The first rule moves anything under logs/ to Standard-IA after 30 days and to Glacier Flexible Retrieval after 90, deletes it after a year, and removes old versions 30 days after they're replaced. The second deletes the invisible parts of multipart uploads that never finished, which are otherwise billed forever.

Keeping buckets private, and sharing safely

New buckets have Block Public Access turned on and ACLs disabled (the "bucket owner enforced" setting), so nothing is public unless you deliberately change that. Access is granted with IAM policies (for your own users and roles) and bucket policies (for other accounts or services). Leave Block Public Access on unless the bucket really must serve the public, and even then prefer CloudFront in front.

To share one private object temporarily, create a presigned URL: a link that carries a signature made with your credentials and works until it expires, with no change to the bucket's settings.

$ aws s3 presign s3://demee-practice-assets/docs/report.pdf --expires-in 3600
https://demee-practice-assets.s3.eu-central-1.amazonaws.com/docs/report.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&...

--expires-in is in seconds (default 3600, maximum 604800, which is 7 days). A URL signed with temporary role credentials stops working when those credentials expire, even if the time you asked for hasn't passed.

Static website hosting

S3 can serve a static site (HTML, CSS, JS, images) directly:

$ aws s3 website s3://demee-practice-site/ --index-document index.html --error-document error.html
$ aws s3 sync ./public s3://demee-practice-site/ --delete

The website endpoint only speaks HTTP and needs the bucket to be publicly readable (Block Public Access off plus a bucket policy allowing s3:GetObject to everyone). The better production setup keeps the bucket private and puts CloudFront in front with Origin Access Control: you get HTTPS with an ACM certificate, your own domain, caching at edge locations, and only CloudFront can read the bucket.

The AWS CLI for S3

$ aws s3 mb s3://demee-practice-assets --region eu-central-1      # make a bucket
$ aws s3 ls                                                       # list your buckets
$ aws s3 ls s3://demee-practice-assets/images/                    # list one prefix
$ aws s3 ls s3://demee-practice-assets --recursive --human-readable --summarize

$ aws s3 cp report.pdf s3://demee-practice-assets/docs/report.pdf         # upload
$ aws s3 cp s3://demee-practice-assets/docs/report.pdf ./report-copy.pdf  # download
$ aws s3 cp ./photos s3://demee-practice-assets/photos/ --recursive \
    --exclude "*" --include "*.jpg"                                # only .jpg files
$ aws s3 cp backup.tar.gz s3://demee-practice-assets/backups/ --storage-class STANDARD_IA

$ aws s3 sync ./site s3://demee-practice-assets/site/ --delete --dryrun   # preview
$ aws s3 sync ./site s3://demee-practice-assets/site/ --delete            # mirror it

$ aws s3 rm s3://demee-practice-assets/docs/report.pdf
$ aws s3 rm s3://demee-practice-assets/tmp/ --recursive
$ aws s3 rb s3://demee-practice-assets --force     # delete all objects, then the bucket

cp copies what you name; sync copies only new and changed files, and with --delete also removes files from the destination that no longer exist in the source, so run it with --dryrun first. Filters are applied in order, which is why "exclude everything, then include *.jpg" works. rb --force can't remove old versions, so on a versioned bucket delete those first (or empty the bucket in the console).

Backups and snapshots

  • EBS snapshots are point-in-time copies stored regionally (so they survive the loss of an AZ). They're incremental: after the first one, only changed blocks are stored. You can create volumes or AMIs from them and copy them to other regions.
  • RDS takes automated backups daily plus transaction logs, allowing point-in-time restore to any second within the retention period (up to 35 days). They are deleted with the database unless you choose to keep them. Manual snapshots stay until you delete them.
  • AWS Backup manages schedules and retention for EBS, RDS, DynamoDB, EFS and more in one place.
  • A backup you have never restored is a hope, not a backup. Test restores regularly.
$ aws ec2 create-snapshot --volume-id vol-0123456789abcdef0 --description "before upgrade"
$ aws rds create-db-snapshot --db-instance-identifier practice-db \
    --db-snapshot-identifier practice-db-before-upgrade

Managed relational databases: RDS and Aurora

RDS runs PostgreSQL, MySQL, MariaDB, Oracle, SQL Server or Db2 for you: AWS installs, patches, backs up and monitors it; you choose the instance size, storage, network and settings. Aurora is AWS's own MySQL- and PostgreSQL-compatible engine with a distributed storage layer that keeps six copies across three AZs; it's usually faster to fail over and to add readers, at a higher price, and Aurora Serverless v2 scales capacity up and down automatically.

$ aws rds create-db-instance --db-instance-identifier practice-db \
    --engine postgres --db-instance-class db.t4g.micro --allocated-storage 20 \
    --master-username appadmin --manage-master-user-password \
    --no-publicly-accessible --storage-encrypted --backup-retention-period 7

--manage-master-user-password makes RDS generate the password and keep it in Secrets Manager. Two features are often confused:

Multi-AZRead replica
PurposeAvailability: survive an AZ or instance failureScaling reads (reports, read-heavy pages)
ReplicationSynchronous to a standby in another AZAsynchronous, so replicas can lag slightly
Serves traffic?The classic single standby doesn't; it takes over automatically on failure, with the same endpointYes, reads only, on its own endpoint
WhereSame regionSame or another region; can be promoted to a standalone database

Add --multi-az to the create command for the first; aws rds create-db-instance-read-replica --db-instance-identifier practice-db-replica --source-db-instance-identifier practice-db for the second. (RDS also offers a Multi-AZ cluster deployment with two readable standbys.)

DynamoDB

DynamoDB is a serverless key-value and document database: no instances, consistent single-digit-millisecond responses at almost any scale, billed on-demand per request or with provisioned capacity. Every item is found by its partition key, optionally combined with a sort key, and you design the keys around the queries you'll run, because there are no joins and scanning a whole table is slow and expensive.

$ aws dynamodb create-table --table-name Orders \
    --attribute-definitions AttributeName=customerId,AttributeType=S AttributeName=orderId,AttributeType=S \
    --key-schema AttributeName=customerId,KeyType=HASH AttributeName=orderId,KeyType=RANGE \
    --billing-mode PAY_PER_REQUEST
$ aws dynamodb put-item --table-name Orders \
    --item '{"customerId": {"S": "c-42"}, "orderId": {"S": "o-1001"}, "total": {"N": "59.90"}}'
$ aws dynamodb query --table-name Orders --key-condition-expression "customerId = :c" \
    --expression-attribute-values '{":c": {"S": "c-42"}}'

HASH is the partition key and RANGE the sort key; the query returns all orders for customer c-42. Note the typed JSON format ("S" string, "N" number sent as a string).

SQL or NoSQL?

  • Choose SQL (RDS/Aurora) when data is relational (users, orders, products linked together), you need joins, ad-hoc queries and multi-row transactions, or you don't yet know every question you'll ask of the data. It's the safe default for most apps.
  • Choose DynamoDB when access patterns are known and simple (get by ID, list by owner), you need huge scale or spiky traffic with no servers to size, or you're building serverless with Lambda.
  • Many systems use both, plus S3 for files and ElastiCache for caching. Never store large files inside a database; store them in S3 and keep the key in the database.

Common mistakes

  • BucketAlreadyExists: someone, in any account, already has that name. Add something unique.
  • AccessDenied on ListBucket but objects work (or the reverse): bucket ARN vs bucket/* ARN in the policy.
  • sync --delete to the wrong prefix, or in the wrong direction: it deletes whatever doesn't match the source. Always run it with --dryrun first.
  • Versioned bucket keeps growing after deletes: old versions and delete markers are still billed. Add NoncurrentVersionExpiration.
  • Database with public access "just to test": keep it private and connect through the app server or Session Manager port forwarding.

Questions

Pick an answer. Get it wrong and you can try again right away, no waiting. 10 questions per topic - pick a filter below, then use Recreate questions for a fresh set on that topic.

Fresh questions every time

Exam

A mixed test across the whole site, shuffled so you never know which topic comes next. When you submit, every mistake comes with the reason and a jump to the exact moment in the video that explains it.

30 questions 6 topics 20 minute limit Up to 70 XP
1–4 answer · ←→ move
History

Essay

0 / 200-250 words
Sample answer
History
0:00 / 0:00
Not started

on YouTube
Subscribe

Topic progress

Activity

Achievements

Settings

Your profile and your account.

Profile details

* Required. Saved in this browser until you sign in.

Letters, numbers, dots, dashes and underscores.
0 / 160

Account

Checking…

App

Install Stackwise on your phone or computer. It opens in its own window from your home screen, and the Docs and cheat sheets you've opened keep working without internet.

Only admins can see this

Dashboard

Sign-ups, activity, messages and reviews in one place.

Prove it

Certificates

Pass a topic's test and get a certificate with its own public page you can share or add to LinkedIn. Each test is 10 questions drawn at random and graded on the server; you need 8 right, you have 15 minutes, and you get one try per topic a day.

From first command to production

Linux for DevOps

A path through Linux the way DevOps engineers use it: ten stages, every command explained with its flags, examples, real output and mistakes, the combinations engineers chain together, and incidents worked through step by step. Practise everything in a safe lab folder.

Before the interview

Interview prep

Questions that come up in real DevOps interviews, with the kind of answer that lands. Say yours out loud first, then compare. Each one links to the chapter that goes deeper.

    Private to you

    My notes

    Everything you wrote down while watching and reading, in one place. Saved to your account, never shown to anyone.