← Lessons/S3 — Object Storage
← S3 — Object Storage

Create a bucket

Learn

Making a bucket

aws s3 mb s3://NAME (make bucket) creates a bucket and confirms it:

make_bucket: groundwork-data

Bucket names are globally unique across every AWS account in the world, because they become part of a URL (groundwork-data.s3.amazonaws.com). So the rules are DNS rules: 3 to 63 characters, lowercase letters, numbers, dots and hyphens, starting and ending with a letter or number. A name someone else already owns fails with BucketAlreadyExists, which is why real bucket names usually carry a company or account prefix.

aws s3 … is the CLI's high-level S3 command set, built for working with files (mb, cp, ls, sync). Underneath it sits aws s3api …, one command per raw API operation (create-bucket, put-object). You'll meet s3api when you need a setting the high-level commands don't expose.

S3 stores files ("objects") inside a "bucket" — a globally-named container. Make one named groundwork-data with the mb (make bucket) command:

aws s3 mb s3://groundwork-data

The output make_bucket: groundwork-data confirms it.

$ bash solution.sh
Loading...

Output

Run your solution to see its output here.