Amazon S3 (Simple Storage Service) is a scalable object storage service provided by Amazon Web Services (AWS). It is designed for storing and retrieving any amount of data from anywhere on the internet, offering a range of features that make it suitable for a wide variety of use cases, from data backup to serving large-scale applications.


Key Features of Amazon S3:


Common Use Cases for Amazon S3:


Service Limits & Quotas:


Pricing Model:


Code Example:

Uploading a file with server-side encryption and a lifecycle-friendly storage class, then generating a presigned URL:

import boto3
from botocore.config import Config

s3 = boto3.client(
    "s3",
    region_name="us-west-2",
    config=Config(signature_version="s3v4"),
)

bucket = "my-data-lake-prod"
key = "incoming/2026-04-25/events.parquet"

# Multipart upload happens automatically for large files via upload_file
s3.upload_file(
    Filename="events.parquet",
    Bucket=bucket,
    Key=key,
    ExtraArgs={
        "ServerSideEncryption": "aws:kms",
        "SSEKMSKeyId": "alias/data-lake",
        "StorageClass": "INTELLIGENT_TIERING",
        "Metadata": {"source": "ingest-service", "date": "2026-04-25"},
    },
)

# Generate a 15-minute presigned download link
url = s3.generate_presigned_url(
    ClientMethod="get_object",
    Params={"Bucket": bucket, "Key": key},
    ExpiresIn=900,
)
print(url)

A lifecycle policy that transitions to IA at 30 days, Glacier at 90, and expires after 7 years:

{
  "Rules": [{
    "ID": "tier-and-expire",
    "Status": "Enabled",
    "Filter": {"Prefix": "logs/"},
    "Transitions": [
      {"Days": 30,  "StorageClass": "STANDARD_IA"},
      {"Days": 90,  "StorageClass": "GLACIER"}
    ],
    "Expiration": {"Days": 2555},
    "AbortIncompleteMultipartUpload": {"DaysAfterInitiation": 7}
  }]
}


Common Interview Questions:

How does S3 achieve 11 nines of durability?

S3 Standard synchronously replicates each object across at least three Availability Zones (typically by erasure coding or full replication), continuously checksums data with MD5/CRC32C, and runs background scrubbing that detects and repairs bit rot. The 11-nines figure means you'd statistically expect to lose one object out of 100 billion per year.

When would you use S3 Intelligent-Tiering vs. lifecycle rules?

Intelligent-Tiering is best when access patterns are unknown or vary per object — S3 monitors per-object access and moves objects between Frequent/Infrequent/Archive tiers automatically (small monitoring fee per object). Lifecycle rules are best when you know the access pattern (logs are hot for 30 days then cold) — no monitoring fee, deterministic transitions.

What is the difference between a bucket policy and an IAM policy?

IAM policies are attached to identities (users, roles) and define what those identities can do across AWS. Bucket policies are attached to the bucket and define who can access the bucket — including cross-account principals or anonymous public access. They evaluate together: a request is allowed only if both the identity policy and the bucket policy permit it (and SCPs/permission boundaries don't deny).

How do you secure an S3 bucket against accidental public exposure?

Enable S3 Block Public Access at the account and bucket level (default since 2023), require SSE-KMS encryption, use bucket policies that deny non-TLS requests (aws:SecureTransport: false), set up AWS Config rules to alert on public buckets, and enable Access Analyzer for S3 to detect cross-account exposure. Use VPC endpoints to keep traffic off the public internet.

What's the right way to handle high request rates on a single bucket?

Since 2018, S3 automatically scales request rates per partitioned prefix — so simply distribute keys across many prefixes (e.g., year=2026/month=04/day=25/) and S3 partitions them transparently. The old advice of randomizing key prefixes is no longer needed. For peak traffic spikes, use CloudFront in front of S3 to absorb GETs at the edge.

How does S3 versioning interact with lifecycle and deletion?

With versioning enabled, a DELETE inserts a "delete marker" rather than removing the object — older versions remain billable. To actually free space, lifecycle rules should expire noncurrent versions (e.g., delete noncurrent versions after 30 days) and clean up expired delete markers. MFA Delete adds a second factor on permanent version deletion for high-security buckets.

Amazon S3 is a cornerstone of cloud storage in AWS, offering flexibility, reliability, and security for storing data at any scale.