Connect your app to AWS S3
Connect your Amazon S3 storage bucket to Lovable so your app can read data files and accept file uploads. Workspace admins set it up once, and every project in your workspace can access that bucket.
Workspace admins or owners who need their app to read external data files or let users upload files to Amazon S3.
Do this, in order
- 1
In the AWS IAM console, create a user and attach an access policy for your target bucket granting read permissions (s3:ListBucket, s3:GetBucketLocation, s3:GetObject) or read-write permissions (adding s3:PutObject).
Lovable requires AWS credentials with exact bucket permissions to list, read, or upload files.
- 2
Generate an Access Key ID and Secret Access Key for that IAM user and save both securely.
These keys act as the login credentials that Lovable uses to talk to AWS.
- 3
In Lovable, navigate to Connectors, select AWS S3, click Connect, and enter a display name, bucket name, AWS region, Access Key ID, and Secret Access Key.
This establishes and verifies the link between your Lovable workspace and the specific AWS S3 bucket.
- 4
If you want users to upload files, open Advanced settings, switch Access type to Read & write, and ensure your IAM policy includes s3:PutObject.
Connections default to read-only mode to prevent unintended file uploads.
- 5
In the AWS S3 console under your bucket's Permissions, add a Cross-origin resource sharing (CORS) rule that lists your app's Lovable URL under AllowedOrigins.
Web browsers block direct file downloads and uploads to S3 unless the bucket explicitly permits your app's web address.
Paste this into your project
Build a data explorer page that connects to my linked S3 bucket, lists all the files in a searchable table with their last modified dates, and lets me click on any CSV or JSON file to preview its contents inline.
Words decoded
- S3 bucket
- A digital storage container in Amazon Web Services where you hold files and folders in the cloud.
- IAM user
- An identity created in AWS with specific permission rules determining what cloud resources it can view or edit.
- Signed URL
- A temporary, secure web address that allows your browser to upload or download a file directly to cloud storage without exposing master passwords.
- CORS
- A browser security setting that prevents a website on one web address from loading or sending files to another address unless granted permission.
Where people get stuck
- Forgetting to set up CORS in AWS will cause browser-based file downloads and uploads to fail completely.
- Connecting a bucket makes its contents accessible across all projects and users within your Lovable workspace.
- The connector does not support deleting files in your S3 bucket, even with write access turned on.
- Third-party S3 alternatives like MinIO or DigitalOcean Spaces are not supported.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.