cnrozkn/s3-outposts-client
关于
Web UI for Amazon S3 on Outposts: read-only by default, with optional per-bucket upload, delete and rename
网站与应用开发可以做什么
- Browse buckets and folders, search by prefix, see object details, metadata, versions and delete markers
- Download, with HTTP range support so interrupted downloads resume
- Preview images, PDFs and text (sandboxed; SVG, HTML, JSON and XML are shown as plain text)
- Optional per bucket: upload, replace (upload over an existing key), create folder, rename or move, delete
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文S3 Outposts Client
A web UI for Amazon S3 on Outposts. It is read-only by default, and upload, delete and rename can be turned on per bucket. It is a web application, not an SDK: run the container next to your Outpost and open it in a browser.
This is an independent project, not affiliated with or endorsed by Amazon Web Services.

Why
The AWS Management Console cannot browse objects on an Outpost, and most generic S3 browsers fail against it:
- Addressing. Outposts objects are reached only through an access point, by its ARN or its alias
(
…--op-s3). Requests go to an Outpost host (<alias>.op-<outpost-id>.s3-outposts.<region>.amazonaws.com) and are signed fors3-outposts, nots3. Tools that expect a plain bucket name ands3signing cannot talk to it. This app uses the AWS SDK for Java, which handles both; a test checks the host and the signing scope offline. - Large folders. On S3 on Outposts, listing with a delimiter has to walk every key under each common
prefix, so a folder with millions of objects can take minutes. This app lists without a delimiter: it reads
keys in order and, when a key opens a subfolder, records the folder once and jumps past it with
StartAfter.
Features
- Browse buckets and folders, search by prefix, see object details, metadata, versions and delete markers
- Download, with HTTP range support so interrupted downloads resume
- Preview images, PDFs and text (sandboxed; SVG, HTML, JSON and XML are shown as plain text)
- Optional per bucket: upload, replace (upload over an existing key), create folder, rename or move, delete
- Stays responsive on large buckets: request and time budget per page, a short listing cache, folder jumps
- Form login, CSRF protection, an audit log of every write, Prometheus metrics and health probes
- One container for
linux/amd64andlinux/arm64(1U Outposts servers run on Graviton)
Quick start
The machine that runs the container must reach your S3 on Outposts endpoint: inside the Outpost VPC, or on premises through an endpoint that uses a customer-owned IP pool.
docker run --rm -p 8080:8080 \
-e S3CLIENT_REGION=<region> \
-e S3CLIENT_USERNAME=admin \
-e S3CLIENT_PASSWORD='<long random password>' \
-e S3CLIENT_BUCKETS_0_NAME=logs \
-e S3CLIENT_BUCKETS_0_ALIAS='<access point alias ending in --op-s3>' \
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN \
ghcr.io/cnrozkn/s3-outposts-client:latest
Then open http://localhost:8080.
Run a single instance. The login session and the CSRF token are kept in memory, so with more than one replica,
requests that reach another replica are sent back to the login page and uploads fail with 403. If you need
several replicas, turn on sticky sessions, for example sessionAffinity: ClientIP on a Kubernetes Service or
cookie affinity on the ingress.
Configuration
Every setting is an environment variable or a key under s3-client in a YAML file.
| Variable | Default | Meaning |
|---|---|---|
S3CLIENT_USERNAME, S3CLIENT_PASSWORD |
required | The login. The app does not start without them, or with a password shorter than 16 characters. |
S3CLIENT_BUCKETS_<n>_NAME |
required | Short name used in URLs: letters, digits, ., _, -. |
S3CLIENT_BUCKETS_<n>_ALIAS |
required | Access point alias (…--op-s3) or access point ARN. |
S3CLIENT_BUCKETS_<n>_CAPABILITIES |
LIST,DETAIL,DOWNLOAD,PREVIEW,VERSIONS |
Allowed operations, comma-separated. Add UPLOAD (upload, replace, create folder) and DELETE to allow writes. Rename needs both. |
S3CLIENT_REGION |
SDK default (AWS_REGION) |
Region the Outpost is homed to. |
S3CLIENT_ENDPOINT |
derived from the access point | Custom endpoint, used by the SDK only with an access point ARN: requests then go to https://<access point>-<account>.<outpost id>.<endpoint host>. With an alias the SDK ignores it. |
S3CLIENT_PAGE_SIZE |
100 |
Entries per page, 1 to 1000. |
S3CLIENT_PREVIEW_MAX_SIZE |
5MB |
Largest object the preview opens. |
S3CLIENT_UPLOAD_MAX_SIZE |
5GB |
Largest upload; 5 GB is the single PUT limit. |
S3CLIENT_WRITE_TIMEOUT |
2h |
Time limit for one upload, copy or delete call. A 5 GB upload over a slow link needs most of it. |
S3CLIENT_LIST_CACHE_TTL |
30s |
How long a listing page is reused. 0 turns the cache off. |
SERVER_SERVLET_SESSION_TIMEOUT |
30m |
How long a login lasts without requests. A running upload or download keeps it. |
LOGGING_STRUCTURED_FORMAT_CONSOLE |
plain text | ecs or logstash for JSON logs. |
TZ |
UTC in the container |
Time zone of the timestamps in the UI. |
With many buckets a YAML file is easier. Mount it and point Spring Boot at it with
-e SPRING_CONFIG_IMPORT=file:/config/application.yml:
s3-client:
region: <region>
buckets:
- name: logs
alias: <access point alias>
- name: uploads
alias: <access point alias>
capabilities: [LIST, DETAIL, DOWNLOAD, PREVIEW, VERSIONS, UPLOAD, DELETE]
Credentials
The app uses the AWS SDK default credential chain: environment variables, IAM roles for service accounts (IRSA), a shared profile, an ECS task role or EKS Pod Identity, and an EC2 instance profile. Which of these an EKS cluster on an Outpost supports depends on the cluster type; see the EKS documentation for local clusters.
IAM permissions
Grant these to the identity the app runs as. The access point policy and the bucket policy must allow the same requests.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Read",
"Effect": "Allow",
"Action": [
"s3-outposts:ListBucket",
"s3-outposts:ListBucketVersions",
"s3-outposts:GetObject",
"s3-outposts:GetObjectVersion"
],
"Resource": [
"arn:aws:s3-outposts:<region>:<account-id>:outpost/<outpost-id>/accesspoint/<access-point-name>",
"arn:aws:s3-outposts:<region>:<account-id>:outpost/<outpost-id>/accesspoint/<access-point-name>/object/*"
]
},
{
"Sid": "WriteOnlyWhenUploadOrDeleteIsTurnedOn",
"Effect": "Allow",
"Action": [
"s3-outposts:PutObject",
"s3-outposts:DeleteObject",
"s3-outposts:GetObjectTagging",
"s3-outposts:PutObjectTagging"
],
"Resource": "arn:aws:s3-outposts:<region>:<account-id>:outpost/<outpost-id>/accesspoint/<access-point-name>/object/*"
}
]
}
Rename copies the object's tags, which is why the write statement includes the tagging actions.
Behind a reverse proxy
TLS at the proxy. Set
SERVER_FORWARD_HEADERS_STRATEGY=nativeso the app readsX-Forwarded-ProtoandX-Forwarded-For. Without it, redirects such as the one to the login page point tohttp://, and the audit log shows the proxy's address instead of the user's. Set it only when clients can reach the app through the proxy alone: a client that reaches it directly could send its own forwarded headers. On Kubernetes, Spring Boot turns it on by itself.Uploads. nginx refuses request bodies over 1 MB by default, and it writes each body to its disk before it passes it on. While it then forwards a large file, the browser waits with nothing to send, and a load balancer in front with a 60 second idle timeout cuts the upload. Raise the limit and turn buffering off:
client_max_body_size 5g; proxy_request_buffering off;With ingress-nginx, use the annotations
nginx.ingress.kubernetes.io/proxy-body-size: "5g"andnginx.ingress.kubernetes.io/proxy-request-buffering: "off".Long links. Page links carry the position of up to 20 earlier pages. With long keys, a link can pass the 8 KB that nginx allows for a request line; raise it with
large_client_header_buffers 4 32k;.
Performance and limits
Listing is built for folders with millions of objects:
- Folder jumps. Keys are read in order and each subfolder costs one request, however large it is. After a jump the next request asks for 100 keys instead of 1000, since a large folder is often followed by another one.
- Folders first. The first page puts the folders of the first 2,000 keys on top. Folders further down appear in key order on later pages.
- A budget per page. A page makes at most 10 S3 requests within 3 seconds. When the budget runs out, the page shows what it has found, says that listing paused, and Next continues from there.
- Listing cache. Each page is kept for 30 seconds, so Previous, Next and reopened folders do not hit S3 again. A write drops the cached pages of its bucket. The cache is per replica: with several replicas, the others can show an older page until it expires.
Some things are left out on purpose. Object counts, folder sizes, sorting by size or date and substring search all need a scan of the whole bucket, and S3 Inventory is not available on Outposts. Search is by prefix, and the order is S3's key order.
S3 on Outposts has no CloudWatch request metrics, so the app publishes its own on the management port
(:8081/actuator/prometheus):
| Metric | What it shows |
|---|---|
s3_client_calls_seconds{operation, outcome} |
Every S3 request, with its duration and result |
s3_client_listing_requests, s3_client_listing_keys |
Requests and keys one listing page needed |
cache_gets_total{cache="s3client.list"} |
Listing cache hits and misses |
http_server_requests_seconds |
Page response times |
To see how much a delimiter costs on your Outpost, time both forms of the same listing:
time aws s3api list-objects-v2 --bucket '<alias>' --prefix '<large-folder>/' --delimiter / --max-keys 1000 --no-paginate > /dev/null
time aws s3api list-objects-v2 --bucket '<alias>' --prefix '<large-folder>/' --max-keys 1000 --no-paginate > /dev/null
Writes
Writes are off unless a bucket lists UPLOAD or DELETE. Each one needs a CSRF token and is logged on the
s3client.audit logger as action=… user=… ip=… bucket=… key=…. Everyone shares one login, so the address
is what tells people apart; behind a proxy it needs forwarded headers, see
Behind a reverse proxy.
- Upload and replace. The browser sends the file as the raw request body, and the app streams it into PutObject, so the file is never written to disk. The limit is 5 GB per file, the single PUT limit. Before replacing an existing key the UI asks; with versioning on, the older versions stay.
- Create folder writes an empty object named
<folder>/, the same way the S3 console does. - Rename or move is a server-side CopyObject followed by DeleteObject. It is not atomic: if the copy fails the source stays, and if the delete fails both keys exist. Objects over 5 GB cannot be renamed.
- Delete removes one object. With versioning on, S3 adds a delete marker and keeps the older versions.
A proxy in front of the app needs a few settings for large uploads; see Behind a reverse proxy.
Security notes
- There is one login for everyone. Run the app behind your VPN or SSO proxy, and do not expose it to the internet.
- Port 8081 serves health and metrics without a login. Keep it on the internal network.
- Turn on writes only for the buckets that need them, and keep the IAM policy as narrow as the capabilities.
- Previews are sent with
Content-Security-Policy: sandbox, and markup types are shown as plain text, so a stored page cannot run script in your session. - Images released after v0.1.2 carry a signed build provenance attestation and an SBOM. To check that an image
was built from this repository:
gh attestation verify oci://ghcr.io/cnrozkn/s3-outposts-client:<version> --owner cnrozkn - To report a vulnerability, see SECURITY.md.
Build from source
Java 21 is the only requirement; the Maven wrapper downloads Maven.
./mvnw verify
./mvnw spotless:apply
S3CLIENT_USERNAME=admin S3CLIENT_PASSWORD='<at least 16 characters>' S3CLIENT_REGION=<region> \
S3CLIENT_BUCKETS_0_NAME=logs S3CLIENT_BUCKETS_0_ALIAS='<access point alias>' \
./mvnw spring-boot:run
docker build -t s3-outposts-client .
verify runs the tests and the formatting check; spotless:apply fixes the formatting. Pushing a tag such as
v0.1.0 makes GitHub Actions test the code and publish the image to GHCR for both architectures.
License
Copyright 2026 Caner Özkan. Licensed under the Apache License, Version 2.0.
探索相关项目
加载中…