Skip to main content
RapidDev - Software Development Agency
bubble-tutorial

How to integrate AWS with Bubble

Connecting Bubble to AWS services uses the API Connector with AWS Signature v4 authentication or pre-signed URLs. The most common use case is S3 for file storage, but you can also connect to Lambda, SES, and other services. This tutorial covers S3 integration for uploading, listing, and downloading files.

What you'll learn

  • How to set up AWS IAM credentials for Bubble integration
  • How to configure the API Connector for AWS S3
  • How to upload files from Bubble to S3 using pre-signed URLs
  • How to list and download S3 files in your Bubble app
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner6 min read25-30 minAll Bubble plansMarch 2026RapidDev Engineering Team
TL;DR

Connecting Bubble to AWS services uses the API Connector with AWS Signature v4 authentication or pre-signed URLs. The most common use case is S3 for file storage, but you can also connect to Lambda, SES, and other services. This tutorial covers S3 integration for uploading, listing, and downloading files.

Overview: Integrating Amazon AWS with Bubble

AWS provides enterprise-grade cloud services that complement Bubble's built-in capabilities. The most common integration is Amazon S3 for file storage — useful when you need more storage than Bubble offers, or need to share files with other systems. This tutorial focuses on S3 but the API Connector pattern works for any AWS service.

Prerequisites

  • An AWS account with S3 access
  • An IAM user with programmatic access and S3 permissions
  • The API Connector plugin installed in Bubble
  • Basic understanding of REST APIs and the API Connector

Step-by-step guide

1

Create an IAM user with S3 permissions in AWS

Log in to the AWS Console. Go to IAM → Users → Add users. Create a user with programmatic access. Attach the AmazonS3FullAccess policy (or create a custom policy with limited S3 permissions for your specific bucket). Save the Access Key ID and Secret Access Key — you will need these in Bubble.

Pro tip: Create a custom IAM policy that restricts access to only the specific S3 bucket your app uses, rather than granting full S3 access.

Expected result: You have an IAM user with Access Key ID and Secret Access Key for S3 operations.

2

Set up the API Connector for S3 pre-signed URL generation

Since AWS Signature v4 is complex to implement directly in Bubble, the recommended approach is to use a Lambda function or a lightweight server that generates pre-signed URLs. Alternatively, use a Bubble plugin like the AWS File Uploader that handles signing. In the API Connector, create a call to your signing endpoint that returns a pre-signed S3 URL for uploading.

Pre-signed URL request
1{
2 "endpoint": "POST https://your-lambda.execute-api.us-east-1.amazonaws.com/presign",
3 "body": {
4 "bucket": "your-bucket-name",
5 "key": "uploads/filename.pdf",
6 "contentType": "application/pdf",
7 "expiresIn": 300
8 },
9 "response": {
10 "uploadUrl": "https://your-bucket.s3.amazonaws.com/uploads/filename.pdf?X-Amz-Algorithm=...",
11 "fileUrl": "https://your-bucket.s3.amazonaws.com/uploads/filename.pdf"
12 }
13}

Expected result: The API call returns a pre-signed URL that allows temporary upload access to your S3 bucket.

3

Upload files to S3 from Bubble

After getting the pre-signed URL from step 2, use another API Connector call to PUT the file directly to S3. Set the method to PUT, the URL to the pre-signed URL (dynamic parameter), and the body to the file content from the File Uploader element. This sends the file directly to S3 without passing through Bubble's servers for storage.

Expected result: Files from Bubble's File Uploader are stored directly in your S3 bucket.

4

List files from S3 in your app

Create an API call to S3's ListObjectsV2 endpoint (or through your Lambda function). The response includes file names, sizes, and last modified dates. Display these in a Repeating Group. For each file, construct the S3 URL for display or generate a pre-signed download URL for temporary access.

Expected result: Users see a list of files stored in S3 within your Bubble app.

5

Generate download URLs for S3 files

For private S3 buckets, generate pre-signed download URLs via your Lambda function. The URL is valid for a limited time (e.g., 5 minutes). Display a Download button that opens the pre-signed URL in a new tab. For public buckets, construct the direct URL: https://bucket-name.s3.region.amazonaws.com/key.

Expected result: Users can download files from your S3 bucket through your Bubble app.

Complete working example

Workflow summary
1AWS S3 INTEGRATION SUMMARY
2============================
3
4ARCHITECTURE:
5 Bubble Lambda (signing) S3 (storage)
6 Lambda generates pre-signed URLs for upload/download
7 Files go directly to S3, not stored in Bubble
8
9API CONNECTOR CALLS:
10 1. Get Upload URL (Action)
11 POST https://your-lambda/presign
12 Body: { bucket, key, contentType, expiresIn }
13 Returns: { uploadUrl, fileUrl }
14
15 2. Upload to S3 (Action)
16 PUT [uploadUrl from step 1]
17 Body: file content from File Uploader
18 Headers: Content-Type: [file mime type]
19
20 3. List Files (Data)
21 GET https://your-lambda/list
22 Params: { bucket, prefix }
23 Returns: { files: [{ key, size, lastModified }] }
24
25 4. Get Download URL (Action)
26 POST https://your-lambda/download-url
27 Body: { bucket, key, expiresIn }
28 Returns: { downloadUrl }
29
30BUBBLE WORKFLOW:
31 Upload button clicked:
32 1. Call Get Upload URL (filename, type)
33 2. Call Upload to S3 (uploadUrl, file)
34 3. Save fileUrl to database record
35
36 Download button clicked:
37 1. Call Get Download URL (file key)
38 2. Open external website: Result's downloadUrl
39
40IAM POLICY (recommended, restrict to one bucket):
41 {
42 "Effect": "Allow",
43 "Action": ["s3:PutObject", "s3:GetObject", "s3:ListBucket"],
44 "Resource": [
45 "arn:aws:s3:::your-bucket",
46 "arn:aws:s3:::your-bucket/*"
47 ]
48 }

Common mistakes when integrating AWS with Bubble

Why it's a problem: Putting AWS Secret Access Key in client-side code or Bubble's frontend

How to avoid: Keep the Secret Access Key in a Lambda function or backend service. Only pass pre-signed URLs to Bubble.

Why it's a problem: Granting AmazonS3FullAccess instead of a bucket-specific policy

How to avoid: Create a custom IAM policy that restricts access to only the specific bucket and operations your app needs

Why it's a problem: Not setting CORS on the S3 bucket

How to avoid: Add a CORS policy to your S3 bucket allowing PUT and GET from your Bubble app's domain

Best practices

  • Never expose AWS Secret Access Keys in frontend code — use pre-signed URLs via a backend service
  • Create a bucket-specific IAM policy with minimal permissions
  • Set CORS on your S3 bucket to allow requests from your Bubble domain
  • Use pre-signed URLs with short expiration times (5-15 minutes) for security
  • Organize files in S3 with a folder structure (e.g., /users/{user_id}/filename)
  • Store the S3 file URL in your Bubble database for easy retrieval

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to integrate my Bubble.io app with Amazon S3 for file storage. I need to upload files from Bubble to S3, list files, and generate download links. Can you walk me through the IAM setup, Lambda function for pre-signing, and API Connector configuration?

Bubble Prompt

Integrate Amazon S3 with my app for file storage. I need to upload files to S3 from a form, list files from a specific bucket folder, and provide download links. Set up the API Connector calls.

Frequently asked questions

Do I need a Lambda function for S3 integration?

It is strongly recommended. Lambda generates pre-signed URLs securely without exposing your AWS credentials. Alternatives include a Bubble plugin that handles signing or a third-party service.

How much does S3 storage cost?

S3 Standard storage costs about $0.023 per GB per month for the first 50TB. Data transfer out costs $0.09/GB after the first 100GB/month. Much cheaper than Bubble's native storage at scale.

Can I use S3 for hosting images displayed in my Bubble app?

Yes. Store image URLs from S3 in your Bubble database and use them as Image element sources. For public images, make the S3 bucket or specific objects publicly readable.

What about other AWS services like SES for email?

The same API Connector pattern works for any AWS service. For SES, create API calls to send emails. For Lambda, trigger functions. For DynamoDB, perform CRUD operations.

Is this faster than Bubble's built-in file storage?

S3 files served via CloudFront CDN can be faster than Bubble's native storage, especially for global users. The upload process involves an extra hop through Lambda for signing.

Can RapidDev help with complex AWS integrations?

Yes. RapidDev has extensive experience connecting Bubble to AWS services including S3, Lambda, SES, Cognito, and DynamoDB for enterprise applications.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.