Creating Your First Bucket
Bucket names in S3 are globally unique — meaning no two buckets in the entire world can have the same name. If "my-bucket" is taken, try "my-bucket-2026" or add your initials.
You can create a bucket through the console or the CLI:
aws s3 mb s3://my-unique-bucket-name --region us-east-1
Once created, choose a region that's close to your users. Unlike EC2, bucket creation is instant — no waiting for servers to boot up.
Uploading and Downloading Files
Uploading files (called "objects" in S3) is simple. You can drag and drop in the console or use the CLI:
aws s3 cp photo.jpg s3://my-bucket/photos/
aws s3 cp s3://my-bucket/documents/report.pdf ./local-report.pdf
You can upload individual files or entire directories. S3 also supports multipart uploads for large files — anything over 5 GB is automatically split into parts and reassembled on the server side.
Organizing with Prefixes
S3 doesn't have real folders — it uses prefixes (paths) to organize objects. When you see "photos/2026/image.jpg" in the console, it looks like a folder structure, but really it's just a flat key name with slashes in it.
Think of it like email labels rather than physical folders. The prefix "photos/2026/" is just part of the object's name, not a separate container. This design is what makes S3 so scalable and fast.
Versioning
S3 versioning keeps every version of every object. If you accidentally overwrite an important file, you can roll back to the previous version. It's like having unlimited undo for your files.
Enable versioning in the bucket properties. Once enabled, every change creates a new version instead of replacing the old one. Keep in mind that multiple versions of the same object count toward your storage usage.
Deleting Objects and Buckets
To delete an object, select it and click delete. To delete an entire bucket, you must first delete all objects inside it (including all versions if versioning is enabled). AWS enforces this to prevent accidental data loss.
aws s3 rm s3://my-bucket/old-file.txt
aws s3 rb s3://my-bucket --force
The --force flag empties the bucket before deleting it. Use with caution — deleted objects in S3 (without versioning) are gone forever with no recycle bin.