# How to Add Object Storage to a Web App Without AWS S3

> Add persistent object storage to your web app with Kuberns Buckets. Store uploads securely, control file access, and deliver assets through a built-in CDN.
- **Author**: parth-kanpariya
- **Published**: 2026-10-16
- **Modified**: 2026-10-16
- **Category**: Deployment Guides
- **URL**: https://kuberns.com/blogs/add-object-storage-to-web-app-without-aws-s3/

---

You can add object storage to a web application without setting up AWS S3. With [Kuberns Buckets](https://kuberns.com/), you can create storage from the same platform used to deploy your application, connect through secure API credentials, choose public or private access, create time-limited links, and deliver files through the built-in CDN.

This gives user uploads a durable home outside the application container. Store each file in a bucket, then save its object key and useful metadata in your database. Have an application ready? [Deploy it on Kuberns](https://dashboard.kuberns.com/) and add persistent storage from the same dashboard.

## TL;DR

- Do not keep durable user uploads inside the running application container.
- Store images, PDFs, documents, and downloadable assets in object storage.
- Save the object key, owner, filename, content type, and access rules in the database.
- Use public access only for files intended for everyone; keep customer files private.
- Kuberns Buckets brings bucket management, API access, time-limited URLs, and CDN delivery into the Kuberns deployment workflow.

## Why Do Uploaded Files Disappear After Deployment?

Uploaded files disappear when an application writes them to an ephemeral filesystem. A deployment platform may replace the current application instance during a new release, restart, scaling event, infrastructure recovery, or container replacement. A file stored only on that instance can vanish or exist on one instance but not another.

This is a real source of confusion for developers. In one community discussion, a developer reported that [images stored on the application filesystem were deleted after redeployment](https://www.reddit.com/r/webdev/comments/ywdbzu/hosting_where_images_in_filesystem_dont_get_deleted_after_redeploying/). The durable design separates the application runtime from its stored objects:

![Developer discussion about images being deleted after application redeployment](https://kuberns-blogs-media.s3.ap-south-1.amazonaws.com/images-stored-on-application-filesystem-were-deleted-after-redeployment.png)

```text
User upload
    -> Application validates the request
    -> Object storage keeps the file
    -> Database keeps the object key and metadata
```

Saving to `/uploads` can appear to work during local development because the same machine and directory stay in place. Production changes that assumption. This is one reason [an application can work locally but fail after deployment](https://kuberns.com/blogs/app-works-locally-fails-in-production/).

## Why Can AWS S3 Setup Become a Separate Infrastructure Task?

Amazon S3 is a capable object-storage service, but using it safely can require more than creating a bucket. A team may also need to choose a region, create IAM identities or roles, grant least-privilege permissions, manage credentials, decide how public access is blocked, configure CORS, create presigned links, and connect a delivery layer such as CloudFront.

AWS documents [how S3 works with IAM](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security_iam_service-with-iam.html), how to [share private objects with presigned URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html), and how to [restrict CloudFront access to an S3 origin](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html). Each capability is useful, but together they create a separate storage and delivery project for a developer whose immediate goal is to make application uploads persistent.

The problem is not that S3 is unreliable or insecure. The problem is operational fit. A small team may not want a separate AWS account, IAM policy workflow, bucket policy, CDN configuration, credential lifecycle, and billing surface for one application requirement.

For teams that do choose AWS, the [AWS production deployment checklist](https://kuberns.com/blogs/aws-production-deployment-checklist/) explains the broader production controls that need attention.

## How Kuberns Buckets Simplifies Object Storage

Kuberns is an **Agentic AI platform for deployment**, and Kuberns Buckets adds object storage to the same product workflow. Instead of deploying the application in one service and assembling storage and delivery across separate cloud products, developers can manage their deployed application and its files from Kuberns.

![Kuberns Agentic AI platform for application deployment and object storage](https://kuberns-blogs-media.s3.ap-south-1.amazonaws.com/kuberns-home-page-new.png)

**Manage buckets from one dashboard:** Create a bucket, upload files, and organize stored objects without beginning in a separate cloud console.

**Choose public or private access:** Use public access for intentionally public assets and private access for files that require authorization.

**Connect through secure API credentials:** Applications can integrate with bucket storage through developer-facing APIs. Keep credentials in server-side environment variables rather than source code or browser bundles.

**Share protected files temporarily:** Time-limited URLs allow an authorized user to retrieve a private file without making the object permanently public.

**Deliver public files through the built-in CDN:** Kuberns Buckets includes global content delivery with caching, avoiding a separate CDN setup for supported file-delivery workflows.

**Keep storage independent from the runtime:** Images and documents remain in the bucket instead of depending on a particular application container.

This extends the same application-first workflow described in the guide to [deploying a complete full-stack application](https://kuberns.com/blogs/deploy-full-stack-app-with-ai/).

## How to Add Kuberns Buckets to Your Web Application

The simplest workflow is to create a bucket, choose the correct access model, connect the backend using protected credentials, and save object references in the database. The exact API fields and request format should follow the current Kuberns Buckets interface or documentation.

### Step 1: Open Your Application in Kuberns

Sign in to Kuberns and open the deployed application that needs file storage. If the repository is still local, first [move the backend from localhost to production](https://kuberns.com/blogs/deploy-backend-from-localhost/) so the application, environment variables, and storage integration can be tested together.

### Step 2: Create a Bucket

Open the Buckets area and create a bucket for the application. Give it a name that describes its purpose, such as user avatars, product media, or customer documents. Separate buckets can make access decisions clearer when public assets and private customer files have different requirements.

### Step 3: Choose Public or Private Access

Use public access for files that anyone may view, such as marketing images, public product photos, or downloadable public assets. Use private access for invoices, reports, account exports, customer attachments, and other protected files.

Do not make a bucket public only because it simplifies retrieval. Privacy should follow the file's real audience.

### Step 4: Create API Credentials

Create the credentials required by the application and place them in Kuberns environment variables. Never commit a storage secret to Git, paste it into frontend code, or include it in a public screenshot.

Credential names, scope, and rotation behavior should be taken from the current Buckets interface or official documentation. The broader guide to [Kuberns production security controls](https://kuberns.com/blogs/kuberns-application-security/) explains why source access, application secrets, and infrastructure permissions should remain controlled throughout deployment.

### Step 5: Connect the Application Backend

The backend should receive the upload, authenticate the user, validate the file, upload it to the bucket, and save the returned object key with its metadata. Do not expose private storage credentials to the browser.

```text
Browser
  -> Application API authenticates the user
  -> Application validates file type and size
  -> Application uploads the object to the bucket
  -> Application saves object key and metadata in the database
```

Use the current documented Kuberns API or SDK for the actual request. Do not assume an S3 endpoint or copy an S3 client example unless Kuberns formally documents that compatibility.

### Step 6: Deliver the File

For a public object, return the supported public delivery URL and let the built-in CDN serve it. For a private object, authenticate the user, check ownership or permission in the database, then create a time-limited URL through the supported Kuberns workflow.

Application authorization still matters. A private bucket prevents open public retrieval, but the application must decide whether the signed-in user is allowed to receive the temporary link.

### Step 7: Redeploy and Verify Persistence

Upload a test image or PDF and record its object key. Deploy a new version of the application, then retrieve the same object. Confirm that a public file still loads or that a private file still requires the expected authorization flow.

This test proves that the application no longer depends on its previous container filesystem. Also test an unauthorized request and an expired temporary URL before accepting the workflow for customer files.

## Kuberns Buckets vs a Separate AWS Storage Setup

The important difference is workflow ownership. AWS provides deeper infrastructure choice, while Kuberns Buckets keeps the storage requirement alongside the application deployment workflow.

| Storage task | Separate AWS setup | Kuberns Buckets workflow |
|---|---|---|
| Deploy the application | Configure through the selected hosting service | Manage through Kuberns |
| Create object storage | Create and configure an S3 bucket | Create a bucket in Kuberns |
| Control application access | Configure IAM identities, policies, and credentials | Create supported API credentials in the Buckets workflow |
| Deliver public files | Configure the required S3 and delivery setup | Use built-in CDN delivery |
| Share private files | Implement presigned access and its permissions | Use supported time-limited URLs |
| Manage services | Work across relevant AWS products and consoles | Manage application and storage in Kuberns |

Kuberns Buckets is a practical fit when the application is deployed on Kuberns and the team wants storage, access settings, application credentials, and file delivery in one workflow. AWS S3 may remain the better fit for an organization already standardized on AWS, using established IAM governance, or requiring a verified S3-specific capability.

This is a question of fit, not universal superiority. Do not assume Kuberns Buckets supports every S3 API or advanced S3 feature unless the current Kuberns documentation explicitly confirms it.

> **Keep deployment and file storage in one workflow.** Kuberns Buckets gives a deployed web application persistent object storage without making the team assemble S3, IAM, and CloudFront separately.

## How Should You Protect Application Files?

Secure storage begins with the correct access model, but it also requires application-level checks. Apply these controls before accepting production uploads:

- Keep customer files private by default.
- Store credentials only in server-side environment variables.
- Give the application only the storage access it needs.
- Validate actual file content instead of trusting the filename extension alone.
- Enforce file-size limits supported by the current product.
- Generate unpredictable object keys rather than exposing user-supplied paths.
- Authenticate the user and check authorization before creating a private link.
- Use short expiration periods when temporary access is sufficient.
- Include tenant or owner information in database authorization checks.
- Define what happens to the object when its application record or user account is deleted.
- Test how credentials are revoked or rotated using the supported workflow.

Infrastructure controls do not replace application authorization. A SaaS application must still prevent one customer from requesting another customer's object. Teams preparing storage for real users should also review the broader requirements for [hosting a SaaS application with paying customers](https://kuberns.com/blogs/host-saas-app-paying-users/).

## Add Object Storage Without Building a Separate Cloud Stack

Durable application uploads should not live inside a disposable application container. Store the file in object storage and keep its key, ownership, and metadata in the database. This design keeps uploads available across redeployments and supports deliberate public or private delivery.

AWS S3 can solve the storage problem, but it may add IAM, bucket policy, credential, and CDN work that a small application team does not want to operate separately. Kuberns Buckets brings bucket management, API integration, public or private access, time-limited URLs, and CDN delivery into the platform used to deploy the application.

Deploy your repository on Kuberns, create a bucket for its files, and test a complete upload and retrieval flow before moving real user content.

<a href="https://dashboard.kuberns.com/" target="_blank" rel="noopener noreferrer">
  <img src="https://kuberns-blogs-media.s3.ap-south-1.amazonaws.com/CTA_banner.png" alt="Deploy a web application and add persistent object storage with Kuberns Buckets" />
</a>

## Frequently Asked Questions

### Do I need AWS S3 to store files for a web application?

No. A web application needs durable storage for files, but that storage does not have to be Amazon S3. Kuberns Buckets provides integrated bucket storage, API access, public or private file access, time-limited URLs, and CDN delivery without requiring a separate AWS S3 configuration.

### Why do uploaded files disappear after deployment?

Files saved to an application container or temporary filesystem can be removed when the platform builds a new release, restarts the service, scales it, or replaces an instance. Store durable uploads in object storage and keep the object key and useful metadata in the database.

### Should I store uploaded files in my database?

For most web applications, store the file in object storage and keep its object key, owner, original filename, content type, size, and access type in the database. Storing binary data in a database can suit specialized requirements, but it is not the usual pattern for application uploads.

### What is the difference between public and private object storage?

Public objects can be delivered through a public URL and suit assets intended for anyone to view. Private objects require controlled access. The application should authenticate the user, verify authorization, and provide a time-limited URL only when that user may access the file.

### Can Kuberns Buckets store images, PDFs, and documents?

Yes. Kuberns Buckets is designed to store application files such as images, documents, PDFs, and other assets. Check the current product interface or documentation for applicable object-size limits, request methods, and supported file-handling behavior before setting production upload limits.

### Does Kuberns Buckets include CDN delivery?

Yes. Kuberns Buckets includes built-in global content delivery for stored files, with caching and optimized delivery. Teams should verify current cache behavior and any invalidation controls in the product documentation before designing an update-sensitive asset workflow.

### Can private files be shared temporarily?

Yes. Kuberns Buckets supports secure, time-limited URLs for protected files. The application should authenticate the requester and verify access before creating a temporary link. Confirm the available expiration settings in the current product interface or documentation.

### Will files remain available after I redeploy my application?

Files stored in a Kuberns Bucket are separate from the application runtime, so an application redeployment does not depend on the old container filesystem. Test the production workflow by uploading a file, redeploying the application, and retrieving the same object afterward.

---
- [More Deployment Guides articles](https://kuberns.com/blogs/category/deployment-guides/1/)
- [All articles](https://kuberns.com/blogs/)