appzasGamesToolsDevLearnCheat sheetsQuick calcsConvertersReferenceNetworkTimeCalculatorsCompareLLM prices

Storing data in S3

Lesson 3 of 510 minBeginner

Object storage: buckets, objects, access control, versioning and storage classes.

Amazon S3 (Simple Storage Service) stores objects, which are files plus metadata, inside buckets. A bucket name is unique worldwide. S3 is not a file system: there are no real folders, only keys such as images/2026/logo.png.

What it is good for

  • Backups and archives.
  • Static website files and images.
  • Logs, data lakes and exports.
  • Application uploads.

Security first

  • New buckets block public access by default. Keep Block Public Access on unless you really need a public site.
  • Control access with IAM policies and, for specific cases, bucket policies.
  • Enable encryption at rest (it is on by default for new objects).
  • Turn on versioning to recover from accidental deletes and overwrites.

CarefulA public bucket with private data is one of the most common and most costly mistakes. Check the Block Public Access settings of every bucket.

Storage classes and lifecycle

Cheaper classes exist for data you rarely read (Infrequent Access, Glacier archive tiers). A lifecycle rule moves objects to a cheaper class or deletes them after a number of days automatically.

aws s3 cp backup.tar.gz s3://my-backups/2026/
aws s3 ls s3://my-backups/2026/
aws s3 sync ./site s3://my-site-bucket

Test yourself

Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.

1. What does S3 store?
2. Which feature helps you recover from an accidental delete?
Hintaws s3 ls followed by the s3:// address.

Key terms