@@ -47,6 +47,7 @@ Commands:
4747 list-roles List roles
4848 list-user-policies List inline policies for specified users
4949 list-users List all users for this account
50+ localserver Start a localhost server that serves S3...
5051 policy Output generated JSON policy for one or more...
5152 put-object Upload an object to an S3 bucket
5253 put-objects Upload multiple objects to an S3 bucket
@@ -420,6 +421,44 @@ Options:
420421 -a, --auth FILENAME Path to JSON/INI file containing credentials
421422 --help Show this message and exit.
422423```
424+ ## s3-credentials localserver --help
425+
426+ ```
427+ Usage: s3-credentials localserver [OPTIONS] BUCKET
428+
429+ Start a localhost server that serves S3 credentials.
430+
431+ The server responds to GET requests on / with JSON containing temporary AWS
432+ credentials that allow access to the specified bucket.
433+
434+ Credentials are cached and refreshed automatically based on the --duration
435+ setting.
436+
437+ To start a server that serves read-only credentials for a bucket, with
438+ credentials valid for 1 hour:
439+
440+ s3-credentials localserver my-bucket --read-only --duration 1h
441+
442+ To run on a different port:
443+
444+ s3-credentials localserver my-bucket --duration 1h --port 9000
445+
446+ Options:
447+ -p, --port INTEGER Port to run the server on (default: 8094)
448+ --host TEXT Host to bind the server to (default: localhost)
449+ --read-only Only allow reading from the bucket
450+ --write-only Only allow writing to the bucket
451+ --prefix TEXT Restrict to keys starting with this prefix
452+ --statement STATEMENT JSON statement to add to the policy
453+ -d, --duration DURATION How long should credentials be valid for, e.g. 15m,
454+ 1h, 12h [required]
455+ --access-key TEXT AWS access key ID
456+ --secret-key TEXT AWS secret access key
457+ --session-token TEXT AWS session token
458+ --endpoint-url TEXT Custom endpoint URL
459+ -a, --auth FILENAME Path to JSON/INI file containing credentials
460+ --help Show this message and exit.
461+ ```
423462## s3-credentials policy --help
424463
425464```
0 commit comments