🔍 Ctrl+K
🟢 Easy

S3 Features — 10 Fundamentals

S3 (Simple Storage Service) is scalable, durable (11 9s), secure, and highly available. From the lessons.txt feature list:

  1. Scalable storage — stores structured, semi-structured, unstructured data
  2. Durability 99.999999999% — 11 nines
  3. Highly protected & replicated across regions — avoids redundancy loss
  4. Security: Encryption (SSE-S3 AES256, SSE-KMS, DSSE-KMS, client-side) + IAM/Bucket Policies + ACLs
  5. Lifecycle management — auto-transition between storage classes
  6. Event notifications (SNS) on create/delete/change
  7. Cross-Region Replication (CRR) — disaster recovery
  8. Logging & Monitoring via CloudWatch — every action recorded
  9. MFA support
  10. Access control — IAM, bucket policies (JSON), ACLs (legacy)
Interview Tip
Emphasize durability, replication, and that S3 is not just storage but an event source for Lambda/Glue.
AWS S3

S3: 11 nines durability, cross-region replication

🟡 Intermediate

S3 Storage Classes

ClassAccessRetrievalCost
S3 StandardFrequentMillis, always availableHigher
Intelligent-TieringAuto frequent ↔ infrequentMillisOptimized, cheaper than Standard
S3 GlacierArchivalMinutes to 12 hoursVery low
Glacier Deep ArchiveRarely accessed~12 hoursLowest
One Zone-IAInfrequent, single AZMillisLow

Choose Standard for hot data, Intelligent-Tiering for unknown patterns, Glacier for archival.

🔴 Advanced

S3 Security — Encryption & Access Control

Encryption

  • Server-Side (SSE-S3 AES256) — AWS encrypts after receipt, manages keys
  • SSE-KMS — AWS KMS manages keys, auditable
  • DSSE-KMS — dual-layer with KMS
  • Client-Side — encrypt on client before send (e.g., WhatsApp), client manages keys
  • In-Transit — TLS during transfer

Bucket Policy Example (from lessons.txt)

JSON
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": "*",
    "Action": "s3:GetObject",
    "Resource": "arn:aws:s3:::mybucket/*"
  }]
}

IAM vs ACL

  • IAM Policies — centralized, user/group/role (RBAC), bucket-level
  • ACLs — object/bucket level, legacy, AWS recommends IAM
🟡 Intermediate

Versioning, Delete & Logging

Enable versioning — every upload gets a unique VersionId. S3 never overwrites, it creates a new version.

  • mydata.csv v1.1, mydata1.csv — each has distinct VersionId
  • Delete in versioned bucket adds a delete marker, not removal — delete the marker to restore, or specify VersionId to permanently delete
  • Logging/Monitoring via CloudWatch (application/system/access/security logs), CloudWatch Events/EventBridge for notifications
🟡 Intermediate

Folder Structure — E-commerce Example (from lessons.txt)

From the prompt: 10 CSV via SFTP + 2 REST APIs (Google Analytics, Facebook) + 15 JDBC tables. Organize by zone and source with date prefix:

text
s3://your-bucket-name/
├── raw_data/
│   ├── FINANCE/csv_files/2025-03-07_file1.csv
│   ├── SALES/google_analytics/2025-03-07_google_analytics_data.json
│   ├── SALES/facebook_insights/2025-03-07_facebook_insights_data.json
│   └── SALES/jdbc_tables/table1/2025-03-07_table1_part1.csv
├── processed_data/cleaned/2025-03-07_cleaned_file1.csv
├── staging_data/intermediate/
├── archive/2025-03/
└── metadata/sftp_file_manifest.json
S3 folder structure

Code from file:

Python
filename = 'finance' + datetime.now().strftime('%d%m%y') + '.csv'
link = 'c://myfolder/finance/csv/' + filename
Tip
Use yyyy-mm-dd prefix and separate raw/processed/staging/archive to make data easily accessible and lifecycle-manageable.
🔴 Advanced

Cross-Account Sharing (Account A → B)

  1. Account A adds bucket policy trusting Account B
  2. Account B creates access point linked to Account A bucket
  3. Account B adds access point policy granting IAM roles
  4. Account B attaches IAM policy to the role
  5. Account B uses access point ARN instead of bucket name