Topic lessonTopic: S3 operations, storage choices and web delivery
S3 bucket basics: creation, upload, download and cleanup checks
S3 stores objects in buckets and retrieves them by key. Begin with one synthetic file in a non-public bucket and verify destination, permissions and downloaded content. Cleanup must account for retained versions, incomplete uploads and references, not just the current object listing.
Explain pre-creation checks, upload/download verification, retained data and the decision to delete or retain a bucket.
A bucket contains objects; a key identifies an object within it. An API is an interface used by programs. These are synthetic teaching steps: no AWS connection, account or credentials are required.
Identify the target before creating anything
This lesson targets a general-purpose bucket, not directory buckets or every other S3 bucket type. Identify account, purpose, Region, namespace, owner and cost-review method first. A bucket name and Region cannot simply be changed after creation; moving data requires a migration decision.
- Pre-creation checks → Upload synthetic dataIdentify target
- Upload synthetic data → Compare downloadDownload and compare
- Compare download → Review retained dataDecide retain or delete
- Pre-creation checks
- Account, namespace, settings
- Upload synthetic data
- Bucket, key, content
- Compare download
- Compare with supplied content
- Review retained data
- Versions, parts, references
Check namespace and non-public settings
In the shared global namespace, a name must not collide with another account within the AWS partition. S3 also supports an account-regional namespace reserved for your account, with a format incorporating account ID, Region and an -an suffix. Check the chosen namespace rules rather than assuming an example name is available.
Avoid secrets, customer names and personal information in bucket names and object keys. Knowing a name does not establish access rights, and an obscure name does not replace authorization.
| Item | Check | Distinction |
|---|---|---|
| Target | Authorized account and general-purpose bucket | Do not practise in a shared production bucket. |
| Object Ownership | New-bucket default: Bucket owner enforced, ACLs disabled | Policies can control access without enabling ACLs. |
| Block Public Access | Keep all four settings for this non-public exercise | Do not disable public-access protection to fix each read error. |
| Encryption | Inspect selected at-rest encryption, such as initial SSE-S3 | Encryption and authorization answer different questions. |
| Versioning | B1 assumes disabled; inspect actual settings separately | Enabling/suspending versioning does not remove historical versions. |
B1: upload a synthetic file and compare the download
B1 assumes a new non-public general-purpose bucket, versioning disabled and an authorized principal. The key is learning/report.csv with the two supplied lines, and the case assumes no existing object is overwritten. The page explains the workflow without uploading anything or incurring resource charges.
month,total
2026-10,120
- Compare account, Region, namespace and selected settings before creation.
- Recheck the bucket and specify the synthetic file and intended key.
- Inspect the resulting key, size, storage class and relevant object information.
- Download through an authorized path and compare against the supplied two-line content.
- Record bucket, key, principal and observations so cleanup targets can be identified.
Listing an object, downloading it and matching its contents are separate checks. An authorized principal can retrieve from a non-public bucket; an anonymous public URL is unnecessary. Investigate operation, target, permissions and BPA when a request fails.
B2: what remains when the current listing is empty?
B2 is a separate versioning-enabled example. A key has v1 containing 6 MiB, then v2 containing 7 MiB, followed by a deletion without a version ID. A delete marker v3 is current while v1/v2 remain. A separate incomplete multipart upload retains 3 MiB of parts.
| Resource | Supplied size | What to inspect |
|---|---|---|
| Noncurrent v1 | 6 MiB | Not current, but its data remains. |
| Noncurrent v2 | 7 MiB | A delete marker does not remove it. |
| Current delete marker v3 | Marker, not a data version | An ordinary current read treats the object as deleted. |
| Incomplete upload parts | 3 MiB | Inspect separately from the object listing. |
B2 retains 13 MiB in data versions; including supplied incomplete parts gives 16 MiB of payload. This is not a billed-size or price calculation including marker metadata. Inspect all versions, markers, unfinished uploads and any writers still adding data.
Separate emptying from deleting the bucket
Emptying deletes contents while retaining the bucket; it is not a reversible practice action. Bucket deletion depends on an empty state including removal of object versions and delete markers, and on conditions such as same-account access points. Investigate a refusal rather than removing protections indiscriminately.
Deleting a shared-global bucket can allow another account to reuse its name. Applications, DNS or log delivery still referencing it may target an unintended bucket. If retaining the name matters, consider emptying and restricting access while keeping the bucket. Distinguish this from account-regional namespace ownership.
- Identify ownership, deletion authority and data that must remain.
- Inspect application, logging and DNS references and ongoing writes.
- Inventory current/noncurrent versions, delete markers and incomplete parts separately.
- Decide whether to retain the empty bucket or delete it with name-reuse implications.
- After an authorized action, recheck retained data, references and cost-bearing resources.
Check upload, access and cleanup decisions
Choose an option to see the result and explanation.
Check, then explain in your own words
- Identify target and initial settings.
- Check the synthetic CSV key and content.
- Compare downloaded content with the original.
- Check B2 retained payload and cleanup conditions.
Check your understanding: B1 downloads a CSV with different rows. Can an upload-completed message alone close verification?
No. Match bucket, key, downloaded version and supplied original content, and check whether another object was retrieved. Permission checks alone do not establish content equality.
Verify operation completion, target identity and retrieved results separately.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
- Getting started with Amazon S3Checked:
Scope and conditionsGeneral-purpose bucket, upload/download, ownership, BPA and encryption; dedicated namespace docs govern current naming. Documentation review, not live AWS verification.
Used in this lessonIdentify the target before creating anything Check namespace and non-public settings B1: upload a synthetic file and compare the download
Scope and conditionsImmutable name/Region and avoiding sensitive names. Documentation review, not live AWS verification.
Used in this lessonIdentify the target before creating anything Check namespace and non-public settings
Scope and conditionsShared global versus account-regional namespaces. Documentation review, not live AWS verification.
Used in this lessonCheck namespace and non-public settings
Scope and conditionsAll versions/delete markers, incomplete multipart uploads and ongoing writes. Documentation review, not live AWS verification.
Used in this lessonB2: what remains when the current listing is empty? Separate emptying from deleting the bucket
Scope and conditionsEmptiness, same-account access points, name reuse and external references. Documentation review, not live AWS verification.
Used in this lessonSeparate emptying from deleting the bucket