| Crates.io | axum-static-s3 |
| lib.rs | axum-static-s3 |
| version | 0.1.2 |
| created_at | 2025-05-30 14:51:41.090419+00 |
| updated_at | 2025-05-30 14:55:27.447713+00 |
| description | Easily serve static files from S3 with Axum |
| homepage | |
| repository | https://github.com/dpruessner/axum-static-s3 |
| max_upload_size | |
| id | 1695164 |
| size | 88,023 |
Easily serve S3 content from an Axum Route.
use axum::{Router, routing::get};
use axum_static_s3::S3OriginBuilder;
let s3_origin = S3OriginBuilder::new()
.bucket("my-bucket")
.prefix("deploy/")
.max_size(1024 * 1024 * 12) // 12 MiB
.build()
let Router = Router::new()
.nest_service("/static", s3_origin)
In modern webapp development, the back-end may be hosted on a local workstation during development, and a serverless compute environment during deployment. This crate makes it easy to serve S3 resources as a path in an Axum router.
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request or contact author directly.