AWS S3 — Interview & Certification Prep

Amazon Simple Storage Service

Durable, virtually unlimited object storage organized as buckets and objects, accessed over HTTPS.

When to use it: For files, media, backups, data lakes, static assets and any blob you address by key rather than mount as a disk.

What you’ll learn about S3

15 lessons, from fundamentals to advanced architecture. Each explains the idea, then lists the points worth remembering:

Beginner

What is S3?

Amazon S3 (Simple Storage Service) is object storage: you store files ("objects") in containers ("buckets") and access them over HTTPS by a key. It is not a file system or a disk — there are no folders in the physical sense, only keys that can contain "/" so tools can present a folder-like view. S3 is designed for very high durability and scales to effectively unlimited data without you provisioning capacity.

  • Object storage, addressed by bucket + key over HTTP(S)
  • Designed for very high durability across multiple facilities
  • No capacity planning — scales automatically

Exam tip: S3 is object storage, not a filesystem or block store. "Folders" are just key prefixes. Buckets are private and encrypted by default — public access is something you deliberately (mis)configure.

Source: AWS docs — S3 User Guide

Buckets, objects, keys and regions

A bucket is a globally-named container created in a specific AWS Region; your data stays in that Region unless you copy/replicate it. An object is the data plus metadata; its key is the full name within the bucket. Bucket names are globally unique; keys are unique within a bucket. Choosing the Region close to your users (or to comply with data-residency rules) matters for latency and cost.

  • Bucket = Region-scoped container with a globally-unique name
  • Object = data + metadata; key = its name in the bucket
  • Data stays in its Region unless you replicate it

Source: AWS docs — S3 User Guide

Storage classes

S3 offers storage classes that trade retrieval speed and access frequency against cost: S3 Standard for frequently-accessed data; S3 Standard-Infrequent Access and One Zone-IA for less-frequent access; S3 Intelligent-Tiering to move objects automatically based on access patterns; and the Glacier classes for archival with progressively longer retrieval times. The right choice depends on how often data is read and how quickly it must come back.

  • Standard vs Infrequent-Access vs Intelligent-Tiering vs Glacier
  • Trade retrieval latency/frequency against storage cost
  • Intelligent-Tiering automates class selection when access is unpredictable

Source: AWS docs — S3 User Guide

Intermediate

Versioning

Versioning keeps every version of an object in a bucket, so overwrites and deletes are recoverable — a delete adds a "delete marker" rather than removing data. It protects against accidental loss and, combined with MFA Delete, against malicious deletion. Versioning increases storage (you keep old versions), so pair it with lifecycle rules to expire non-current versions.

  • Keeps prior versions; delete adds a delete marker
  • Protects against accidental/malicious overwrite and delete
  • Pair with lifecycle to expire old versions and control cost

Source: AWS docs — S3 User Guide

Lifecycle rules

Lifecycle rules automate moving objects to cheaper storage classes (transition) or deleting them (expiration) after a defined age. This is the primary cost lever for large buckets: keep recent data hot, transition older data to IA/Glacier, and expire what you no longer need — including old object versions when versioning is on.

  • Transition to cheaper classes and/or expire objects by age
  • The main S3 cost-optimization tool at scale
  • Can target non-current versions when versioning is enabled

Source: AWS docs — S3 User Guide

Encryption

S3 encrypts objects at rest by default. You can use S3-managed keys (SSE-S3), AWS KMS keys (SSE-KMS) for auditable, controllable keys, or dual-layer/customer-provided variants for stricter needs. Encryption in transit uses HTTPS/TLS; you can enforce it with a bucket policy that denies non-TLS requests. For interviews, the key trade-off is SSE-KMS (fine-grained control + CloudTrail audit) vs SSE-S3 (simplest).

  • At rest: SSE-S3, SSE-KMS, and customer-provided options
  • In transit: TLS, enforceable via bucket policy
  • SSE-KMS adds key control + audit at some request overhead

Source: AWS docs — S3 User Guide

Bucket policies, IAM and Block Public Access

Access to S3 is governed by IAM identity policies (what a principal can do), bucket policies (resource policies on the bucket, including cross-account and conditions like TLS-only or specific VPC endpoints), and — as a safety net — S3 Block Public Access, which prevents accidental public exposure. Least privilege plus Block Public Access on by default is the secure baseline.

  • IAM policies (identity) + bucket policies (resource) combine
  • Block Public Access prevents accidental public buckets
  • Use conditions (TLS, VPC endpoint, account) for tighter control

Exam tip: Block Public Access is a safety net that overrides permissive ACLs/policies. The secure baseline is: private bucket + Block Public Access on + least-privilege access via IAM/bucket policy + presigned URLs or CloudFront OAC for sharing.

Source: AWS docs — S3 User Guide

Presigned URLs

A presigned URL grants time-limited access to a single object using the signer’s credentials, so clients can upload or download directly to/from S3 without the bucket being public and without proxying bytes through your servers. This is the standard pattern for user uploads/downloads: your backend signs a URL, the client transfers directly to S3.

  • Time-limited, per-object access with the signer’s permissions
  • Lets clients upload/download directly, keeping buckets private
  • Offloads byte transfer from your servers

Source: AWS docs — S3 User Guide

Multipart upload

Multipart upload splits a large object into parts uploaded in parallel and reassembled by S3, improving throughput and resilience (a failed part is retried without restarting the whole upload). It is recommended for large files and required beyond a maximum single-PUT size. Combine with lifecycle rules to clean up incomplete multipart uploads.

  • Parallel part uploads → higher throughput and retryable
  • Recommended/required for large objects
  • Add a lifecycle rule to abort incomplete uploads

Source: AWS docs — S3 User Guide

Durability vs availability

Durability is the probability your data is NOT lost — S3 is designed for extremely high durability by storing redundant copies across multiple facilities in a Region. Availability is the probability you can ACCESS it at a given moment (subject to the storage class's SLA). These are different axes: One Zone-IA keeps the same durability design within a SINGLE AZ, so it's cheaper but loses the data if that AZ is destroyed — lower effective durability against an AZ loss. Match the class to how catastrophic data loss would be.

  • Durability = won't lose data (redundant copies across a Region)
  • Availability = can reach it now (per storage-class SLA)
  • One Zone-IA trades AZ-loss protection for lower cost

Exam tip: One Zone-IA is cheaper but stored in a single AZ; don't use it for data that must survive that AZ failing.

Source: AWS docs — S3 User Guide

Comparison: S3 vs EBS vs EFS (and versioning vs replication)

S3 vs EBS vs EFS: S3 is OBJECT storage accessed over HTTPS by key — massively scalable, durable, for files/backups/data lakes/static assets (not a filesystem). EBS is BLOCK storage for a SINGLE EC2 instance (a virtual disk / boot volume / database volume). EFS is a shared FILE system (NFS) mountable by MANY instances at once across AZs. Versioning vs replication: versioning keeps historical copies of an object in the SAME bucket (recover overwrites/deletes); replication copies objects to ANOTHER bucket/Region (DR, lower-latency regional reads) — they solve recovery vs geographic redundancy.

  • S3 = object (HTTP/key); EBS = block for one instance; EFS = shared file for many instances
  • Choose by access model: object store vs single-instance disk vs shared filesystem
  • Versioning = history in the same bucket; Replication = copies to another bucket/Region

Source: AWS docs — S3 User Guide

Advanced

CloudFront integration

Fronting S3 with CloudFront caches objects at edge locations close to users, cutting latency and origin requests. Origin Access Control lets CloudFront read a private bucket while keeping it non-public, so users hit the CDN, not the bucket directly. This is the canonical pattern for global static assets and media delivery.

  • Edge caching reduces latency and S3 request load
  • Origin Access Control keeps the bucket private
  • Standard pattern for global assets and media

Source: AWS docs — S3 User Guide

Cross-Region replication & durability

S3 stores objects redundantly within a Region for high durability. For cross-Region resilience, compliance, or lower-latency reads in another Region, replication asynchronously copies objects to a destination bucket (Cross-Region or Same-Region Replication). For disaster recovery, replication plus versioning gives a recoverable, geographically-separated copy.

  • Redundant within a Region for durability
  • CRR/SRR asynchronously copy objects to another bucket
  • Replication + versioning underpins S3 disaster recovery

Source: AWS docs — S3 User Guide

Event notifications & Object Lock

S3 can emit event notifications (object created/deleted, etc.) to Lambda, SQS, SNS or EventBridge to trigger processing pipelines (e.g. generate thumbnails on upload). Object Lock enforces write-once-read-many (WORM) retention for compliance, preventing deletion/overwrite for a set period — useful for regulated data and ransomware protection.

  • Events → Lambda/SQS/SNS/EventBridge drive processing pipelines
  • Object Lock enforces WORM retention for compliance
  • Common for upload-processing and immutable-audit patterns

Source: AWS docs — S3 User Guide

Static website & cost optimization

A static site can be hosted from S3 and served globally via CloudFront + Route 53, with TLS from ACM — no servers to run. Cost optimization for S3 at scale comes from choosing the right storage class, lifecycle transitions/expirations, cleaning up incomplete multipart uploads and old versions, and serving through CloudFront to cut repeated origin GETs.

  • S3 + CloudFront + Route 53 = serverless static hosting
  • Cost levers: storage class, lifecycle, cleanup, CDN offload

Source: AWS docs — S3 User Guide

Common AWS S3 interview questions

  1. Users upload large images that must be processed (resized) and then served globally with low latency. Walk through the storage, upload, processing and delivery design.

    A strong answer covers: presigned URLs / multipart for direct large uploads to a private S3 bucket; S3 event notifications triggering Lambda for processing; storing derivatives back in S3; CloudFront (with Origin Access Control) for global low-latency delivery; encryption (SSE-KMS) and least-privilege access; lifecycle rules for cost. Trade-offs: synchronous vs event-driven processing, cost of CDN vs origin load.

  2. How would you securely serve private user files from S3 to a global audience without making the bucket public?

    Strong answer: keep the bucket private with Block Public Access; generate presigned URLs (or use CloudFront with Origin Access Control) for time-limited per-object access; encrypt with SSE-KMS; enforce TLS via a bucket policy; least-privilege IAM. CloudFront adds global low latency and edge security.

  3. Users upload large private video files from around the world and need immediate global playback. Design the AWS storage and delivery architecture.

    A strong answer covers:

    • Durable object storage (S3)
    • Large/resilient uploads (multipart, presigned)
    • Keep it private (no public bucket)
    • Global low-latency delivery (CloudFront)
    • Encryption at rest (KMS)
    • Cost tiering (lifecycle/storage classes)
  4. How do you securely serve private user files from S3 to a global audience without making the bucket public? Consider encryption and access control.

    A strong answer covers:

    • Private bucket + Block Public Access
    • Presigned URLs or CloudFront OAC
    • Encrypt with SSE-KMS + kms:Decrypt for readers
    • Global low latency via CloudFront
  5. A workload runs a steady 24/7 fleet plus nightly fault-tolerant batch jobs, and stores rarely-read compliance data for years. How do you optimize cost across compute and storage?

    A strong answer covers:

    • Reserved/Savings Plans for the steady fleet
    • Spot for fault-tolerant batch
    • S3 lifecycle tiering to Glacier + expiry
    • Right-size + Auto Scaling to cut idle
  6. An application in AWS Account A needs read access to an S3 bucket in Account B. How would you design that access?

    A strong answer covers:

    • Cross-account role assumed by A, or a bucket policy naming A
    • Temporary credentials — no shared long-lived access keys
    • Least privilege: scope to the exact prefix and actions
    • KMS key policy must also grant decrypt if the bucket is encrypted

    Common wrong turns:

    • Creating an IAM user in Account B and sharing its access keys
    • Making the bucket public to avoid cross-account setup
    • Granting s3:* on the whole bucket
  7. A workload is generating unexpectedly high NAT Gateway costs. How would you investigate and reduce them?

    A strong answer covers:

    • NAT bills per hour AND per GB processed — find the traffic
    • Use VPC Flow Logs / Cost Explorer to identify top talkers
    • S3/DynamoDB gateway endpoints remove that traffic from NAT
    • Interface endpoints (PrivateLink) for other AWS services

    Common wrong turns:

    • Assuming a NAT gateway is only an hourly charge
    • Adding more NAT gateways to "spread load" instead of removing traffic
    • Moving instances to public subnets to avoid NAT
  8. You must serve private user files to a global audience without ever making the bucket public. How do you design it?

    A strong answer covers:

    • Keep the bucket private with Block Public Access on
    • Presigned URLs, or CloudFront with Origin Access Control
    • Encrypt at rest (SSE-KMS) and enforce TLS in transit
    • CloudFront edge caching for global low latency

    Common wrong turns:

    • Making the bucket public to "simplify" delivery
    • Proxying every byte through application servers
    • Forgetting readers of SSE-KMS objects also need kms:Decrypt

Answer these with follow-ups and optional AI feedback in the AWS mock interviewer.

Key S3 comparisons

S3 vs EBS vs EFS

S3 is object storage addressed by key over HTTPS — for files, backups, data-lake objects and static assets. EBS is a block volume attached to a SINGLE EC2 instance in one AZ (a virtual disk). EFS is a shared filesystem MANY instances mount at once across AZs. Choose by access model: object vs single-instance disk vs shared filesystem.

Other AWS services to study next

S3 rarely appears on its own in an exam question — these come up alongside it:

Related AWS topics