Multipart, events, checksums and cost
Multipart upload for large objects
Multipart upload divides one object into parts. Initiate the upload, upload numbered parts, then complete it with the required part identifiers. Retrying a failed part can avoid retransmitting the entire file. Incomplete uploads consume storage until completed or aborted; use a scoped lifecycle rule to abort old incomplete uploads. Keep the upload ID and required part metadata in a trusted process. A completed multipart object is read as one object. Choose bounded concurrency to balance throughput, memory, retries and requests; measure before tuning.
initiate -> part 1 -> part 2 (retry) -> part 3 -> completeCheck integrity explicitly
An ETag is an entity identifier useful in conditional operations; it is not universally the MD5 digest of the complete object, particularly for multipart uploads and some encryption modes. Choose a supported checksum algorithm and checksum type, full-object or composite as appropriate, and compare the same representation on both sides. A mismatch calls for investigation or a controlled retry, not ignoring verification. A checksum detects accidental data changes; authenticity requires a trusted expected value or separate authentication mechanism. The example uses a local SHA-256 test vector, not an S3 multipart checksum.
SHA-256("abc") = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015adEvents can repeat or arrive late
S3 notifications can trigger downstream processing through supported destinations such as SQS, SNS, Lambda or EventBridge. Delivery is at least once by design and order is not guaranteed. A consumer building a latest-state index should compare hexadecimal sequencer values for the same object key, using numeric comparison or equal-width left padding. Do not compare sequencers across different keys. Persist processing state and make side effects idempotent, meaning reprocessing does not repeat the intended effect. For production, atomic updates and retry recovery are needed; a simple in-memory model is only a teaching example. Use a separate output bucket or disjoint prefix to avoid notification loops.
same bucket/key: sequencers 0A, 0C, 0B, 0Caccept 0A; accept 0C; ignore 0B; ignore duplicate 0CSelect a bucket type and budget
The examples use general purpose buckets. Directory buckets serve specialized low-latency workloads such as S3 Express One Zone; table buckets serve managed table workloads, and vector buckets support vector storage and search. Check feature, API, Region and durability requirements separately; do not assume the versioning or governance behavior in this chapter transfers to every bucket type. For data pipelines estimate storage of versions and replicas, request and transition counts, retrieval, incomplete parts, transfer, KMS requests and downstream processing. Use inventory and Storage Lens to find cost drivers. Example: two copies of 100 GB at a fictional $0.02/GB-month cost $4/month for storage alone. Actual price and Region must be verified before deployment.
2 * 100 GB * $0.02/GB-month = $4/month (storage only)Practice: a reliable ingestion pipeline
Plan a report ingestion pipeline that retries failed parts, verifies integrity, indexes only the newest event for each key, and avoids triggering itself. If the event sequence arrives as 10 then F (hexadecimal), identify the later event and explain why string comparison without padding is wrong. Review the offline lab scenarios and propose a recovery check for an incomplete upload. No real API call, bucket, event or KMS key is required.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Multipart, events, checksums and cost — knowledge check
Apply the fictional report storage and governance design.
A large upload fails on part 3. What is the advantage of multipart upload?
A multipart object has an ETag. Which integrity check is appropriate?
Events for one key arrive with hex sequencers 10 then F. Which is newer?
The event consumer writes results to its input prefix. What change helps avoid loops?
Two 100 GB copies cost a fictional $0.02/GB-month each. What is the storage-only estimate?