S3
s3 lists3 lists3 puts3 puts3 gets3 gets3 put_texts3 put_texts3 get_texts3 get_texts3 heads3 deletes3 delete_manys3 copys3 presigns3 presign

s3 list <config> <bucket>


Description

    List the objects of a bucket: a JSON array of rows {key, size, last_modified, etag, storage_class}, 1000 rows at most (see the parameters)

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
admin
s3 list "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports"
mentdb
[{"key": "2026/old.csv", "size": 8, "last_modified": "2013-05-24T00:00:00.000Z", "etag": "5bdbb6e3e9f1873bc57aec2932291506", "storage_class": "STANDARD"}, {"key": "readme.txt", "size": 3, "last_modified": "2013-05-24T00:00:00.000Z", "etag": "149603e6c03516362a8da23f624db945", "storage_class": "STANDARD"}]

s3 list <config> <bucket> <json_params>


Description

    List with parameters: prefix, delimiter (the result becomes {rows, prefixes, truncated}: the folders of the level), limit (1000, 100000 at most; the continuation tokens are followed). Without a delimiter a result of exactly limit rows may be cut

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    json_params:   The parameters - String - required
admin
s3 list "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "{\"prefix\": \"2026/\", \"limit\": 2}"
mentdb
[{"key": "2026/old.csv", "size": 8, "last_modified": "2013-05-24T00:00:00.000Z", "etag": "5bdbb6e3e9f1873bc57aec2932291506", "storage_class": "STANDARD"}]
the folders with a delimiter (fixed result: local fake S3 server that verifies the signatures, not a real S3)
admin
s3 list "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "{\"delimiter\": \"/\"}"
mentdb
{"rows": [{"key": "readme.txt", "size": 3, "last_modified": "2013-05-24T00:00:00.000Z", "etag": "149603e6c03516362a8da23f624db945", "storage_class": "STANDARD"}], "prefixes": ["2026/"], "truncated": false}
MinIO on the local host: path style is automatic (fixed result: local fake S3 server that verifies the signatures, not a real S3)
admin
s3 list "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"endpoint\": \"http://localhost:9000\"}" "reports" "{\"prefix\": \"readme\"}"
mentdb
[{"key": "readme.txt", "size": 3, "last_modified": "2013-05-24T00:00:00.000Z", "etag": "149603e6c03516362a8da23f624db945", "storage_class": "STANDARD"}]

s3 put <config> <bucket> <key> <file_path>


Description

    Upload a file in streaming (SHA-256 of the file in the signature), in multipart beyond 64 MB: parts of 16 MB (more when 10000 parts would not be enough), an abort of the upload on a failure. Returns {etag, size}

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    file_path:   The local file (same access rules as the other file functions) - String - required
admin
s3 put "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "2026/sales.csv" "tmp/sales.csv"
mentdb
{"etag": "223ae219843cad57201a290e69ea8b18", "size": 16}

s3 put <config> <bucket> <key> <file_path> <json_params>


Description

    Upload with parameters: content_type (application/octet-stream), metadata (object of names and printable ASCII values, 2048 bytes at most), storage_class, multipart_threshold (64 MB, from 5 MB to 5 GB), part_size (16 MB, from 5 MB to 5 GB), unsigned_payload (false; true: no hash of the file, only over https). A multipart ETag ends with the number of parts

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    file_path:   The local file (same access rules as the other file functions) - String - required
    json_params:   The parameters - String - required
admin
s3 put "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "2026/sales2.csv" "tmp/sales.csv" "{\"content_type\": \"text/csv\", \"metadata\": {\"owner\": \"finance\"}, \"storage_class\": \"STANDARD_IA\"}"
mentdb
{"etag": "223ae219843cad57201a290e69ea8b18", "size": 16}
in multipart beyond 5 MB (a file of 12 MB) (fixed result: local fake S3 server that verifies the signatures, not a real S3)
admin
s3 put "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "2026/big.bin" "tmp/big.bin" "{\"multipart_threshold\": 5242880, \"part_size\": 5242880}"
mentdb
{"etag": "ef9172b51f6266b261f36f2c8df26669-3", "size": 12582912}

s3 get <config> <bucket> <key> <file_path>


Description

    Download an object in streaming to a temporary file of the same folder, renamed at the end (no partial file on a failure; an existing file keeps its POSIX permissions). Returns {file, size, etag, content_type, last_modified}

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    file_path:   The local file (same access rules as the other file functions) - String - required
admin
s3 get "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "2026/sales.csv" "tmp/sales_copy.csv"
mentdb
{"file": "tmp/sales_copy.csv", "size": 16, "etag": "223ae219843cad57201a290e69ea8b18", "content_type": "application/octet-stream", "last_modified": "2013-05-24T00:00:00Z"}

s3 get <config> <bucket> <key> <file_path> <json_params>


Description

    Download with parameters: range (bytes=0-9, bytes=100- or bytes=-500), max_bytes (100 GB)

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    file_path:   The local file (same access rules as the other file functions) - String - required
    json_params:   The parameters - String - required
admin
s3 get "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "2026/sales.csv" "tmp/head.csv" "{\"range\": \"bytes=0-9\"}"
mentdb
{"file": "tmp/head.csv", "size": 10, "etag": "223ae219843cad57201a290e69ea8b18", "content_type": "application/octet-stream", "last_modified": "2013-05-24T00:00:00Z"}

s3 put_text <config> <bucket> <key> <text>


Description

    Upload a text in UTF-8 (256 MB at most), text/plain; charset=utf-8 by default. Returns {etag, size}

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    text:   The text - String - required
admin
s3 put_text "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "readme.txt" "Résumé 2026"
mentdb
{"etag": "715d288e5385febbb63a1a7183e274d9", "size": 13}

s3 put_text <config> <bucket> <key> <text> <json_params>


Description

    Upload a text with parameters: content_type, metadata, storage_class

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    text:   The text - String - required
    json_params:   The parameters - String - required
admin
s3 put_text "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "state.json" "{}" "{\"content_type\": \"application/json\"}"
mentdb
{"etag": "99914b932bd37a50b983c5e7c90ae93b", "size": 2}

s3 get_text <config> <bucket> <key>


Description

    Read an object as UTF-8 text, 10 MB at most (an error if larger, or if it is not valid UTF-8: use s3 get)

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
admin
s3 get_text "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "readme.txt"
mentdb
Résumé 2026

s3 get_text <config> <bucket> <key> <json_params>


Description

    Read a text with parameters: max_bytes (10 MB, 256 MB at most)

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    json_params:   The parameters - String - required
admin
s3 get_text "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "readme.txt" "{\"max_bytes\": 1024}"
mentdb
Résumé 2026

s3 head <config> <bucket> <key>


Description

    Information about an object: {exists, size, etag, content_type, last_modified, metadata}. A 404 (no key or no bucket) gives {exists: false}, not an error

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
admin
s3 head "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "2026/sales2.csv"
mentdb
{"exists": true, "size": 16, "etag": "223ae219843cad57201a290e69ea8b18", "content_type": "text/csv", "last_modified": "2013-05-24T00:00:00Z", "metadata": {"owner": "finance"}}
no such key (fixed result: local fake S3 server that verifies the signatures, not a real S3)
admin
s3 head "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "nothing"
mentdb
{"exists": false}

s3 delete <config> <bucket> <key>


Description

    Delete an object; S3 also answers a success when it does not exist. Returns 1

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
admin
s3 delete "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "state.json"
mentdb
1

s3 delete_many <config> <bucket> <json_keys>


Description

    Delete a list of keys (100000 at most), in batches of 1000 with a Content-MD5. Returns {deleted, errors}: the errors of S3 per key do not stop the other keys

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    json_keys:   The keys as a JSON array - String - required
admin
s3 delete_many "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "[\"2026/big.bin\", \"2026/sales2.csv\"]"
mentdb
{"deleted": 2, "errors": []}

s3 copy <config> <src_bucket> <src_key> <dst_bucket> <dst_key>


Description

    Copy an object on the server side, in the same service (5 GB at most on AWS). Returns {etag, last_modified}; an error sent after a 200 by S3 is detected

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    src_bucket:   The source bucket - String - required
    src_key:   The source key - String - required
    dst_bucket:   The target bucket - String - required
    dst_key:   The target key - String - required
admin
s3 copy "{\"access_key_env\": \"S3_KEY\", \"secret_key_env\": \"S3_SECRET\", \"region\": \"eu-west-3\"}" "reports" "readme.txt" "archive" "2026/readme.txt"
mentdb
{"etag": "715d288e5385febbb63a1a7183e274d9", "last_modified": "2013-05-24T00:00:00.000Z"}

s3 presign <config> <bucket> <key>


Description

    A temporary GET URL with the signature in the query (1 hour), without any network call. The URL gives access to whoever has it

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
admin
s3 presign "{\"access_key\": \"AKIAIOSFODNN7EXAMPLE\", \"secret_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\", \"endpoint\": \"https://s3.amazonaws.com\"}" "examplebucket" "test.txt"
mentdb
https://examplebucket.s3.amazonaws.com/test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261104T045735Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=8fe1fc058f7ea7a1294e1bae27fc0e94ee59c75d8a67c6d3bae9ccca02eca092

s3 presign <config> <bucket> <key> <json_params>


Description

    A presigned URL with parameters: method (GET or PUT), expires_in (seconds, 3600, 604800 at most), now (a fixed date, for tests: 20130524T000000Z or 2013-05-24T00:00:00Z)

Parameters

    config:   The S3 configuration as JSON: access_key and secret_key (or access_key_env and secret_key_env: the names of environment variables), session_token (or session_token_env), region (us-east-1), endpoint (https://s3..amazonaws.com; http only for localhost), path_style (false; true by default for an endpoint given as an IP address or localhost), timeout_ms (60000) - String - required
    bucket:   The name of the bucket - String - required
    key:   The key of the object (1 to 1024 bytes in UTF-8) - String - required
    json_params:   The parameters - String - required
admin
s3 presign "{\"access_key\": \"AKIAIOSFODNN7EXAMPLE\", \"secret_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\", \"endpoint\": \"https://s3.amazonaws.com\"}" "examplebucket" "test.txt" "{\"expires_in\": 86400, \"now\": \"20130524T000000Z\"}"
mentdb
https://examplebucket.s3.amazonaws.com/test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20130524%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20130524T000000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=aeeed9bbccd4d02ee5c0109b86d86835f995330da4c265957d157751f604d404
an upload link, the key is encoded
admin
s3 presign "{\"access_key\": \"AKIAIOSFODNN7EXAMPLE\", \"secret_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\", \"endpoint\": \"https://s3.amazonaws.com\"}" "examplebucket" "my folder/é+1.txt" "{\"method\": \"PUT\", \"expires_in\": 600, \"now\": \"2026-11-04T10:00:00Z\"}"
mentdb
https://examplebucket.s3.amazonaws.com/my%20folder/%C3%A9%2B1.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261104T100000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=bcd4b6b72eeed62dbe6c59277688764e991e38005f3fcdeb6b148a58bf4939f0