Downloading files from through API Gateway is a common pattern for exposing private storage as a secure REST API. You can achieve this using two primary methods: a direct AWS Service Proxy (no code) or an AWS Lambda Integration (custom logic). Comparison of Methods Direct S3 Proxy Lambda Integration Pre-signed URLs Effort Low (Configuration only) Medium (Requires code) Low/Medium Max File Size 10 MB (Hard limit) 6 MB (Sync limit) Unlimited (Up to 5GB) Use Case Static assets, simple proxying Dynamic naming, transformations Large files, high throughput Option 1: Direct API Gateway to S3 Proxy (No-Code)
: The Lambda function uses the Boto3 SDK to fetch the object from S3. download file from s3 using api gateway
This method is the most efficient for small files under 10MB because it removes the overhead of a Lambda function. Downloading files from through API Gateway is a
: Create a role that grants s3:GetObject permissions for your specific bucket and allow ://amazonaws.com to assume it. This method is the most efficient for small