Documentation
Bucket

🪣 Bucket Infrastructure

The buckets.ts is responsible for setting up AWS S3 storage buckets for file storage. It creates two buckets in total.

Assets Bucket

This bucket is intended for user file uploads with restricted access. It is configured with CORS settings to allow access from specific origins, such as your main application domain (https://app.${DOMAIN}). The allowed HTTP methods for this bucket include GET, PUT, POST, DELETE, and HEAD.

Additionally, this bucket has public read access enabled, making it possible to access the bucket contents via the internet.

Public Assets Bucket

This bucket is used for hosting static assets such as images and videos for your landing page. It is configured with CORS settings to allow access from any origin (*). The allowed HTTP methods for this bucket are GET and HEAD.

This bucket also has public read access enabled.

Both buckets are created using the Bucket component (opens in a new tab) from the SST framework.