Sub topic 1
What Object Storage Is and Where S3 Fits
Prerequisites
Assume you know basic command-line usage, HTTP and REST concepts, AWS accounts and IAM roles, and basic Python syntax. You also need configured AWS credentials with permission to use Amazon S3.
Object Storage and S3
Object storage keeps complete items, called objects, instead of exposing blocks or folders as a filesystem. Each object contains data, metadata, and a key that identifies it.
Amazon S3 is AWS's object storage service. Choose it for backups, documents, logs, media, datasets, and other data accessed through HTTP APIs. A block service such as Amazon EBS provides a virtual disk for one or more compute workloads. A file service such as Amazon EFS provides shared filesystem paths. S3 does not provide normal filesystem locking or unrestricted in-place edits.
An S3 object lives in a bucket. A bucket is a top-level container with a globally unique name. The bucket belongs to one AWS account and has a Region. Bucket names use lowercase letters, numbers, periods, and hyphens. Treat a bucket name as permanent infrastructure because changing it usually means creating a new bucket and moving data.
Buckets, Objects, Keys, and Prefixes
A key is the complete string used to identify an object. For example, reports/2026/report.csv is one key. S3 does not create real directories. The slash is a character in the key, but tools display common starting strings as folders.
That starting string is a prefix. Listing the prefix reports/ finds keys that begin with that value. Design prefixes around common access and listing patterns, such as tenant, data type, and date.
Working with the CLI and SDK
The AWS CLI sends S3 API requests from a shell. The following commands create a bucket in Ireland, upload a file, list its prefix, download it, and delete the object:
aws s3api create-bucket \
--bucket my-example-bucket-123456789012 \
--region eu-west-1 \
--create-bucket-configuration LocationConstraint=eu-west-1
aws s3 cp report.csv s3://my-example-bucket-123456789012/reports/2026/report.csv
aws s3 ls s3://my-example-bucket-123456789012/reports/
aws s3 cp s3://my-example-bucket-123456789012/reports/2026/report.csv report-copy.csv
aws s3 rm s3://my-example-bucket-123456789012/reports/2026/report.csvAn SDK provides the same API through program code. Boto3 loads credentials from the normal AWS configuration:
import boto3
s3 = boto3.client("s3")
bucket = "my-example-bucket-123456789012"
key = "reports/2026/report.csv"
s3.upload_file("report.csv", bucket, key)
response = s3.list_objects_v2(Bucket=bucket, Prefix="reports/")
for item in response.get("Contents", []):
print(item["Key"], item["Size"])
s3.download_file(bucket, key, "report-copy.csv")Exercise
Is reports/2026/ a directory that S3 creates and manages?
Show answer
No. It is a prefix in object keys. S3 uses the full key string to identify each object.