A practical field guide from Automation Ace.
Short answer: to upload, analyze, and automate at the same time on Amazon S3, subscribe to the s3:MultipartUpload:PartUploaded event (through S3 Event Notifications or Amazon EventBridge), and for each event call GetPart with the upload ID and part number to read that part while the upload continues. Process each part with your AI step (transcribe, extract, classify, validate), store results keyed by upload ID, part number, and ETag, act on partial results early, then stitch everything together when CompleteMultipartUpload fires and clean up if the upload is aborted. Handle duplicates, overwritten parts, out-of-order parts, and data that spans part boundaries.
API and event details reflect the GetPart API reference and the S3 User Guide at the time of writing; upgrade to the latest AWS CLI and SDKs.
Short answer
- Qualify: general purpose bucket, multipart upload started after 2026-11-29 UTC.
- Subscribe: PartUploaded events to a queue, Lambda, or EventBridge.
- Read: GetPart for each part (or a byte range).
- Process: AI per part, idempotent and keyed by ETag.
- Act early on partial results.
- Finish on completion; clean up on abort.
The architecture
Upload, analyze, automate: all at the same time
Client / app CreateMultipartUpload -> UploadPart 1..N (parallel) -> Complete
|
S3 event (per part) s3:MultipartUpload:PartUploaded {uploadId, partNumber, partSize, partETag}
| S3 Event Notifications (SQS / Lambda) or EventBridge rule
Part worker (Lambda) GetPart(uploadId, partNumber) -> process -> store result keyed by
uploadId + partNumber + ETag (idempotent)
|
AI step transcribe / extract / classify / validate this part
|
Act early partial transcript, preview, alerts, early warnings
|
On complete s3:ObjectCreated:CompleteMultipartUpload -> stitch results,
whole-file checks, final summary, notify / hand off
On abort s3:MultipartUpload:Aborted -> discard partial results
Step 1: Confirm your uploads qualify
- Use a general purpose bucket; GetPart is not supported on directory buckets, S3 on Outposts, or access points.
- The upload must be a multipart upload initiated after November 29, 2026, 00:00 UTC.
- Choose part sizes that make sense for processing (for example, a few minutes of audio per part); smaller parts mean earlier starts but more requests.
Step 2: Subscribe to part-uploaded events
- Configure S3 Event Notifications for
s3:MultipartUpload:PartUploaded(and the Complete and Aborted events) to an SQS queue or Lambda, or enable Amazon EventBridge and write a rule. - Put a queue in front of workers to absorb bursts and retry failures.
New to Lambda? AWS Lambda for beginners.
Step 3: Read each part with GetPart
# Lambda part worker (Python, boto3). Verify parameter and event field names
# against the current SDK and event schema.
import boto3, json
s3 = boto3.client("s3")
def handler(event, context):
for rec in event["Records"]: # S3 notification delivered via SQS or direct
body = json.loads(rec["body"]) if "body" in rec else rec
for r in body.get("Records", [body]):
bucket = r["s3"]["bucket"]["name"]
key = r["s3"]["object"]["key"]
mpu = r["s3"]["multipartUpload"] # uploadId, partNumber, partSize, partETag
# (confirm the key name in the event schema)
resp = s3.get_part(Bucket=bucket, Key=key,
UploadId=mpu["uploadId"], PartNumber=mpu["partNumber"])
data = resp["Body"].read()
etag = resp["ETag"]
status = resp.get("MultipartUploadStatus") # IN_PROGRESS or COMPLETED
if already_processed(key, mpu["uploadId"], mpu["partNumber"], etag):
continue # duplicate delivery
result = process_part(data, part_number=mpu["partNumber"]) # your AI step
save_result(key, mpu["uploadId"], mpu["partNumber"], etag, result)
# Read just the first 64 KB of part 1 (for example, a header or file signature)
aws s3api get-part --bucket my-bucket --key uploads/meeting.wav \
--upload-id "$UPLOAD_ID" --part-number 1 --range bytes=0-65535 header.bin
# Requires the latest AWS CLI. A range request returns 206 Partial Content.
The response's x-amz-multipart-upload-status header is IN_PROGRESS (the part can still be overwritten) or COMPLETED (immutable). Grant s3:GetIncompleteUpload in addition to read permissions.
Step 4: Process parts with AI, idempotently
- Boundaries: parts are raw bytes. For text records, buffer the incomplete last line and prepend it to the next part's processing; for audio or video, use container-aware segmenting or overlap windows.
- Idempotency: skip a part already processed with the same ETag; redo it if the ETag changed. See duplicate event deliveries.
- AI output: ask for structured JSON and validate it; see invalid AI JSON.
- Concurrency: cap parallel workers to respect AI rate limits; see 429 errors.
Step 5: Act on partial results
- Stream partial transcripts or previews to the user interface.
- Alert early on problems found in the first parts (wrong format, bad data, policy issues) and stop the job if needed.
- Route urgent findings to people or downstream automations via a webhook to Zapier, Make, or n8n.
- Mark early actions as provisional until the upload completes, since parts can still change.
Step 6: Finish, stitch, and clean up
- On
s3:ObjectCreated:CompleteMultipartUpload, confirm every part has a result for the final ETags, stitch in part-number order, and run whole-file steps (summaries, final validation). - On
s3:MultipartUpload:Aborted, delete partial results. - Use a durable orchestrator such as Step Functions for long multi-step finishes; see durable workflows explained.
Production checklist
| Concern | What to do |
|---|---|
| Permissions | s3:GetObject (or s3:GetObjectVersion) plus s3:GetIncompleteUpload for in-progress uploads |
| Duplicate events | Idempotency key: upload ID + part number + ETag |
| Overwritten parts | While status is IN_PROGRESS, a part can be re-uploaded; compare ETags and redo if changed |
| Out-of-order parts | Store results by part number; stitch in order on completion |
| Record and frame boundaries | Read a small overlap from the next part, or buffer the tail of each part |
| Aborted uploads | Handle the Aborted event; delete partial results |
| Unsupported cases | General purpose buckets only; uploads initiated after 2026-11-29 UTC; not directory buckets, Outposts, or access points |
| Cold storage | For completed uploads in Glacier Flexible Retrieval, Deep Archive, or Intelligent-Tiering, GetPart returns InvalidObjectState |
| Cost | Each GetPart is a request; plus Lambda and AI costs per part |
Example pipelines
| Pipeline | Per part | On completion | Act early |
|---|---|---|---|
| Meeting transcription | Transcribe audio chunk with a little overlap | Merge transcript, summarize, extract action items | Live partial transcript; flag keywords |
| Video ingest | Transcode or thumbnail segment | Build the final rendition and manifest | Preview available during upload |
| CSV or JSONL import | Validate and transform rows (handle split rows) | Load into the warehouse; reconcile counts | Stop and alert on schema errors early |
| Document archive | Extract text and classify | Index the whole archive | Route urgent documents immediately |
The bigger picture: why wait for the upload?, S3 as an automation engine, and rethinking sequential workflows. File types: binary vs text files in automation.
Frequently asked questions
How do I process S3 multipart upload parts before the upload completes?
Subscribe to the s3:MultipartUpload:PartUploaded event, then call GetPart with the bucket, key, upload ID, and part number to read each part while the upload continues, and process it in a Lambda function or worker.
What permissions does GetPart need?
For general purpose buckets, s3:GetObject (or s3:GetObjectVersion for versioned objects), plus s3:GetIncompleteUpload for reading parts of in-progress uploads, according to the AWS API reference.
Can an uploaded part change after I process it?
Yes, while the upload is in progress a part can be overwritten by uploading the same part number again. Key results by ETag and reprocess when the ETag changes; after completion, parts are immutable.
How do I handle records that span two parts?
Buffer the incomplete tail of each part and combine it with the start of the next part, or read a small overlapping byte range, and stitch results in part order when the upload completes.
Can GetPart read a byte range?
Yes. Pass a Range header such as bytes=0-65535 to read part of a part; a valid range returns 206 Partial Content. Only one range per request is supported.
Disclaimer: Amazon S3 features, API behavior, Regions, limits, and pricing change; the GetPart API and part-level events were new at the time of writing, so test with your own workloads and check AWS documentation before relying on them in production; details reflect public documentation at the time of writing. Automation Ace is not affiliated with Amazon Web Services. This article may include links to apps, products, or services; some links may be affiliate links, which means Automation Ace may earn a commission at no extra cost to you.