AWS S3 Storage (Python)

Generate AWS S3 pre-signed URLs for browser uploads with MIME validation.

1|Updated May 2, 2026
One-click install
npx skills add https://github.com/Levironexe/architect --skill aws-s3-storage-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: AWS S3 Storage (Python)
Source: https://github.com/Levironexe/architect/tree/main/skills/patterns/s3-python
Command: npx skills add https://github.com/Levironexe/architect --skill aws-s3-storage-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents risky or inefficient file handling by standardizing a secure, scalable pattern for storing user-uploaded files in AWS S3 from a Python backend.

Core Features & Use Cases

  • Direct browser uploads with pre-signed URLs: Generates pre-signed PUT URLs for uploading and pre-signed GET URLs for downloads without proxying file bytes through your server.
  • MIME allowlist validation and key-first persistence: Validates allowed MIME types before signing and stores only the S3 object key in your database, generating signed download URLs on-demand.
  • Upload confirmation for integrity: Requires a follow-up confirm call where the server verifies the object exists in S3 (via head_object) before persisting the key.

Quick Start

Implement presign endpoints that return a signed upload URL and an object key after validating MIME type, then implement a confirm endpoint that verifies the key exists in S3 before saving it in your database.

Frequently Asked Questions about AWS S3 Storage (Python)

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable direct browser uploads to S3 without proxying files through my Python backend?

Use pre-signed PUT URLs to enable direct browser uploads to S3. Your Python backend validates the MIME type against an allowlist, generates a pre-signed URL for the browser, and then confirms the upload via head_object before persisting the object key.

What is the best way to validate file types for pre-signed S3 URL uploads?

The best way to validate file types for pre-signed S3 URL uploads is applying a server-side MIME allowlist before signing the PUT object request. This prevents risky or inefficient file handling by ensuring only authorized types are uploaded.

How do I securely store references to uploaded S3 objects in my database?

Store references to uploaded S3 objects by persisting only the S3 object key in your database. Avoid storing full URLs; instead, generate pre-signed GET URLs on demand when access-controlled downloads are needed.

How does an upload confirmation step verify integrity after a direct S3 upload?

An upload confirmation step verifies integrity by requiring a follow-up API call where the server checks object existence using head_object. This confirms the file actually exists in S3 before saving the object key reference to your database.

Can I use boto3 to generate access-controlled download URLs for files stored in S3?

Yes, you can use boto3 to generate access-controlled download URLs for files stored in S3. By creating pre-signed GET URLs on demand, clients can securely download files without streaming file bytes through your server.

Do I need to stream file bytes through my server when serving access-controlled S3 downloads?

No, you do not need to stream file bytes through your server for access-controlled S3 downloads. By generating pre-signed GET URLs via boto3, the browser downloads files directly from S3 while maintaining access restrictions.