Amazon Simple Storage Service (S3) is object storage for files, images, logs, backups, and static site artifacts. In this guide you create a bucket, upload a test object, and attach a minimal bucket policy so the object’s URL loads anonymously in a browser.
What is an S3 bucket?
A bucket is a regional container for objects. Each object has a key (path-like name) and is addressed by API calls such as PutObject and GetObject—not as a classical file system.
When should you use this walkthrough?
Use it to learn console basics and how Principal: "*" policies interact with Block Public Access. For production web apps, prefer private buckets with CloudFront and Origin Access Control, or presigned URLs.
What you will build
A sandbox bucket, a sample image upload, a public-read GetObject policy, and a working Object URL in the browser. Next, pull objects locally with Download files from S3.
S3 next to compute
Apps on EC2 or behind an Application Load Balancer often store user uploads or marketing assets in S3 while the app serves HTML and APIs.
Learning path, not production defaults.
You will briefly allow public read for static assets such as images. Do not upload private user data to this bucket.
Production caution.
A fully public read bucket is rarely right for private data. Prefer private buckets with CloudFront OAC, presigned URLs, or IAM-authenticated access.
Durability vs security.
S3 is built for extreme durability across AZs. You still choose encryption, lifecycle rules, and least-privilege policies.
Reference
Core Concepts
Terms you will use while working with S3:
Concept
Meaning
Bucket
Regional container with a globally unique name
Object key
Full path-like name of a file inside the bucket
Block Public Access
Account/bucket switches that can block anonymous policies
Bucket policy
JSON resource policy attached to the bucket
s3:GetObject
Permission required to download or view an object
Object URL
HTTPS link to an object in the console
ACLs
Legacy per-object permissions; usually keep disabled
Versioning / lifecycle
Retain variants and expire or transition storage classes
Before you start
Prerequisites
Have these ready before you create a bucket:
An AWS account with permission to create buckets and edit policies (for example s3:CreateBucket, s3:PutBucketPolicy, and object write actions).
Access to the S3 console in a non-production or sandbox account.
A sample image or file you are comfortable making publicly readable for this lab.
Walkthrough
Examples
Create a bucket, upload an object, attach a public-read policy, and open the Object URL.
Example 1 — Create an S3 Bucket
Pick a globally unique name and Region, then create the bucket.
Most Access Denied cases are Block Public Access, ARN typos, or account-level locks.
bpa
Policy saved but still private
Block Public Access (bucket or account) can ignore public statements. Clear the relevant switches for this lab only.
arn
Wrong bucket name in the ARN
The Resource must be arn:aws:s3:::exact-bucket-name/*. A typo yields Access Denied.
name
Bucket name already taken
Names are globally unique. Add an account or project suffix and retry.
data
Sensitive files in a public lab bucket
Delete the objects, tighten the policy, and re-enable Block Public Access when the lab ends.
acl
Mixing ACLs and policies
Prefer bucket policies with ACLs disabled. Per-object ACLs are harder to audit.
cdn
Serving the internet from the S3 website endpoint
For real sites, put CloudFront in front and keep the bucket private with OAC.
Remember
Key Takeaways
Buckets are regional; object keys form the logical path inside.
Block Public Access must allow your intent before Principal: "*" works.
Object URL is a smoke test; production usually stays private + CDN.
Next: CLI downloads, CloudFront, versioning, and lifecycle rules.
One line: create bucket, upload, allow GetObject in policy (lab only), then test the Object URL.
Frequently Asked Questions
It allows you to attach bucket policies or object ACLs that grant anonymous or cross-account access. AWS warns because accidental public data exposure is common; use private buckets with CloudFront origin access controls or signed URLs for production web apps.
A bucket policy is attached to the bucket resource in S3 and can allow or deny principals including anonymous users. IAM policies attach to users, groups, or roles and control what identities can do across AWS services, including specific S3 actions on ARNs you list.
In the S3 console, open the object and copy the Object URL. It only works from a browser if your bucket policy or ACLs allow s3:GetObject for the caller; otherwise you will see Access Denied.
Check that Block Public Access is not blocking the policy, the bucket policy statement uses the correct bucket ARN, and there is no explicit deny elsewhere. Also confirm you are using the object URL for the right Region and key.
AWS recommends bucket policies and IAM with ACLs disabled for new workloads. Policies centralise permissions on the bucket and are easier to audit than per-object ACLs.
S3 is flat object storage addressed by bucket plus key prefix. The console shows folders for convenience, but there are no classical directories; operations are API calls such as ListObjectsV2 and GetObject.