Interview Prep/Python for DevOps/AWS automation with boto3

You need to process every new file uploaded to an S3 bucket with Python. Design it.

IntermediateScenarioAWS automation with boto3
Answer

Situation read → Event-driven processing; must handle bursts and failures.

What I'd do →

  1. S3 event notification to SQS (or EventBridge), with a Lambda or container worker consuming from SQS.
  2. Worker parses the event, URL-decodes the key (urllib.parse.unquote_plus, keys arrive encoded), processes, and deletes the message only on success.
  3. Configure a dead-letter queue and alarm on its depth.
  4. Make processing idempotent (S3 can deliver events more than once), keyed on bucket, key and version or ETag.

Why → A queue buffers bursts and gives retries plus a DLQ for free.

Interview tip → The unquote_plus detail catches many people; keys with spaces arrive as +.

All Python for DevOps questions Roadmap: Python for automation

More on AWS automation with boto3