Blog

How to Integrate AWS S3 with Bubble

Sep 20, 2025

Calculating...

Calculating...

Harish Malhi - founder of Goodspeed

Founder of Goodspeed

How to Integrate AWS S3 with Bubble – Goodspeed Studio blog

Learn how to integrate AWS S3 with Bubble to add scalable file storage, direct uploads, and CDN-backed delivery to your no-code application.

Learn how to integrate AWS S3 with Bubble to add scalable file storage, direct uploads, and CDN-backed delivery to your no-code application.

Why AWS S3 Instead of Bubble's Built-In Storage?

Bubble stores uploaded files on its own servers and serves them through its own CDN. For most apps, this works fine. But Bubble's file storage has limitations that become problems at scale. Upload size limits can be restrictive for video-heavy apps. There's no built-in image transformation (resizing, format conversion, thumbnail generation). You can't easily set fine-grained access controls on individual files. And if you ever need to migrate away from Bubble, extracting all your files is a separate project.

AWS S3 solves all of these. It's the industry standard for file storage with virtually unlimited capacity, fine-grained IAM permissions, lifecycle policies for automatic archival, and direct integration with CloudFront CDN for global delivery. When paired with Bubble, it gives you enterprise-grade file management while Bubble handles the application logic and UI.

What You Can Build With S3 and Bubble

The most common use case is a document management system. Legal tech, healthcare, and compliance apps need to store sensitive documents with strict access controls, audit logs, and retention policies. S3 provides all of this out of the box. You upload documents from Bubble to S3, store the S3 URL and metadata in Bubble's database, and serve files through pre-signed URLs that expire after a set time.

Second is image-heavy platforms. If you're building a marketplace, portfolio site, or social platform in Bubble, you need image resizing, format optimization (WebP conversion), and fast delivery. S3 paired with a Lambda function or CloudFront function can automatically generate thumbnails and optimized versions of every uploaded image.

Third is video hosting. Bubble's file storage isn't designed for large video files. S3 handles multi-gigabyte uploads through multipart upload, and you can connect it to AWS MediaConvert for transcoding or serve videos directly through CloudFront with adaptive bitrate streaming.

Setting Up AWS S3 with Bubble

Start by creating an AWS account and an S3 bucket. Choose a region close to your users for better latency. For bucket settings, disable "Block all public access" if you need publicly readable files (like product images), or keep it blocked if all files should be private (like user documents).

Create an IAM user specifically for your Bubble integration. Never use your root AWS credentials. The IAM user needs a policy that grants s3:PutObject, s3:GetObject, s3:DeleteObject, and s3:ListBucket permissions scoped to your specific bucket. Generate an access key and secret key for this user.

In Bubble's API Connector, AWS S3's REST API uses AWS Signature Version 4 for authentication, which is complex. Each request needs a signed authorization header that includes your access key, a date stamp, the region, and a hash of the request body. Bubble can't natively generate AWS Signature V4 headers, so you have three practical approaches.

Approach one: use a Bubble plugin. The "S3 File Uploader" plugin handles the signature generation and provides a file upload element that sends files directly from the user's browser to S3. This is the fastest path for most builders. The plugin manages pre-signed upload URLs and returns the S3 file URL to your Bubble workflow.

Approach two: use pre-signed URLs generated by a Lambda function. Create a simple AWS Lambda function that generates pre-signed upload URLs. Call this function from a Bubble backend workflow via API Gateway. The function returns a temporary URL that allows a single file upload directly to S3. Your Bubble front-end then uploads the file to that URL using a multipart form or the S3 upload plugin.

Approach three: proxy uploads through a middleware. If you need server-side processing (virus scanning, metadata extraction) before storing files, route uploads through a Lambda function or EC2 instance that receives the file, processes it, then stores it in S3. This adds latency but gives you full control over the upload pipeline.

Direct Browser Upload with Pre-Signed URLs

The most efficient architecture for Bubble apps is direct browser-to-S3 upload using pre-signed URLs. The flow works like this: your Bubble app calls a backend API (Lambda via API Gateway or your own endpoint) that generates a pre-signed PUT URL for S3. This URL includes all the authentication information embedded in the query string, so the browser can upload directly to S3 without knowing your AWS credentials.

The pre-signed URL is time-limited (typically five to fifteen minutes) and scoped to a specific S3 key (file path). Your Bubble workflow generates the URL, passes it to the front end, and a JavaScript snippet or plugin performs the actual upload. When the upload completes, you store the S3 file URL in your Bubble database.

For downloads of private files, you use the same pre-signed URL approach but for GET requests. When a user needs to view or download a file, your Bubble backend generates a pre-signed GET URL with a short expiration (one to twenty-four hours) and displays it as a link or image source. This ensures files are only accessible to authenticated users for a limited time.

Connecting S3 to CloudFront for Performance

If you're serving files publicly (product images, marketing assets), put CloudFront in front of your S3 bucket. CloudFront caches files at edge locations worldwide, so users download from a server near them instead of making a round trip to your S3 region. Setup involves creating a CloudFront distribution with your S3 bucket as the origin. Use an Origin Access Identity to ensure files are only served through CloudFront, not directly from S3.

In your Bubble app, replace S3 URLs with CloudFront URLs. Instead of https://your-bucket.s3.amazonaws.com/image.jpg, use https://d1234abcdef.cloudfront.net/image.jpg. The performance improvement is significant — page load times drop noticeably when serving images through a CDN versus directly from S3.

Common Pitfalls

CORS configuration is the number one issue. If you're uploading directly from the browser to S3, your bucket needs CORS rules that allow requests from your Bubble app's domain. Without proper CORS headers, browser uploads fail silently or with cryptic errors. Configure CORS in your S3 bucket settings to allow PUT and GET methods from your Bubble domain.

The second pitfall is not setting content types correctly on upload. If you upload a PNG image to S3 without specifying Content-Type: image/png, S3 stores it as application/octet-stream. When you try to display it in Bubble using an image element, the browser might download it instead of rendering it. Always include the correct Content-Type header or metadata when generating pre-signed upload URLs.

Cost management is also important. S3 storage is cheap, but request costs and data transfer costs add up. If your app serves thousands of images daily, the data transfer fees from S3 to the internet can be significant. CloudFront actually reduces costs because cached files don't incur S3 data transfer charges for repeat downloads.

Finally, don't forget lifecycle policies. If your app generates temporary files, thumbnails, or processing artifacts, configure S3 lifecycle rules to automatically delete or archive files after a set period. Without lifecycle management, your storage costs grow indefinitely.

DIY vs Hiring a Bubble Developer

Using a Bubble plugin for S3 uploads is achievable for any Bubble builder — expect a few days of setup. Direct browser upload with pre-signed URLs requires some JavaScript comfort and AWS configuration knowledge. The Lambda function setup for generating pre-signed URLs pushes you slightly outside pure no-code territory.

For production apps with security requirements (HIPAA-compliant document storage, access logging, encryption at rest), the AWS configuration becomes the complex part, not the Bubble integration. You need proper IAM policies, encryption settings, bucket policies, and often VPC endpoints. An experienced developer handles this in days. Learning it from scratch takes weeks.

Scale Your Bubble App's File Storage

Related guides:

  • Bubble firebase integration guide

  • how to build a podcast platform with Bubble

  • Bubble google sheets integration guide

AWS S3 removes the file storage ceiling from your Bubble app. Whether you need secure document management, image optimization, or video hosting, S3 provides the infrastructure that scales with your product. Talk to our team at Goodspeed Studio about setting up S3 properly for your Bubble application.

S3 Gives Bubble Enterprise-Grade File Storage

AWS S3 is the right choice when Bubble's built-in file storage hits its limits. Pre-signed URLs keep your credentials secure, CloudFront handles performance, and lifecycle policies manage costs. Use a plugin for basic uploads and move to Lambda-generated pre-signed URLs when you need more control. Talk to our Bubble developers.

Harish Malhi - founder of Goodspeed

Harish Malhi

Founder of Goodspeed

Harish Malhi is the founder of Goodspeed, one of the top-rated Bubble agencies globally and winner of Bubble’s Agency of the Year award in 2024. He left Google to launch his first app, Diaspo, built entirely on Bubble, which gained press coverage from the BBC, ITV and more. Since then, he has helped ship over 200 products using Bubble, Framer, n8n and more - from internal tools to full-scale SaaS platforms. Harish now leads a team that helps founders and operators replace clunky workflows with fast, flexible software without writing a line of code.

Frequently Asked Questions (FAQs)

Is AWS S3 expensive to use with Bubble?

S3 storage costs about $0.023 per GB per month. For most Bubble apps, monthly S3 costs are under $10. Data transfer and request costs are the bigger variable — serving thousands of files daily without CloudFront can add up. CloudFront actually reduces costs by caching at the edge.

Can I upload files directly from Bubble to S3?

Not directly through Bubble's backend due to AWS Signature V4 complexity. Use either a Bubble S3 plugin that handles signatures client-side, or generate pre-signed upload URLs through a Lambda function and upload from the browser. Both approaches keep your AWS credentials secure.

How do I make S3 files accessible only to logged-in users?

Keep your S3 bucket private and use pre-signed GET URLs. When a logged-in Bubble user needs to access a file, generate a pre-signed URL with a short expiration time through a backend workflow. The URL works for anyone who has it, but expires quickly so it can't be shared long-term.

Can I use S3 for user profile images in Bubble?

Yes. Upload profile images to S3 and store the S3 URL (or CloudFront URL) in the user's Bubble record. Display it using an image element bound to that URL field. For better performance, use a Lambda@Edge function or S3 Object Lambda to auto-resize images on the fly.

Do I need CloudFront with S3 for my Bubble app?

If you're serving files publicly and your users are geographically distributed, yes. CloudFront reduces load times significantly and can actually lower your AWS bill by reducing direct S3 data transfer. For private files served through pre-signed URLs, CloudFront is optional but still beneficial for performance.

How do I handle large file uploads to S3 from Bubble?

Use S3's multipart upload feature. For files over 100MB, the upload is split into parts that upload in parallel, then S3 reassembles them. Most S3 Bubble plugins handle this automatically. If using pre-signed URLs, you'll need to implement multipart logic in JavaScript on the front end.

The smartest AI builds, in your inbox

Every week, you'll get first hand insights of building with no code and AI so you get a competitive advantage