- receiver — owns the S3 bucket & generates presigned URLs.
- sender — is the source of the data, and runs the upload.
usecase-beta
direction LR
actor Receiver
actor Sender
systemBoundary Transfer["S3 data transfer"]
Issue("Issue upload config")
Upload("Upload a folder")
end
Receiver --> Issue
Sender --> Upload
Used by the receiver to generate a presigned POST URL as a curl config file. This contains the ${filename} suffix and can be used to upload multiple files in a directory.
- python3 (tested with python 3.14)
- boto3
pip install --user boto3chmod +x issue-upload-config.pyusage: issue-upload-config.py [-h] --bucket BUCKET --profile PROFILE
[--expires-in SECONDS]
--upload-label UPLOAD_LABEL
--data-type DATA_TYPE
Issue a presigned S3 POST as a curl config. By convention, files are uploaded
to <bucket>/data/<upload-label>/<data-type>
options:
-h, --help show this help message and exit
--bucket BUCKET S3 bucket name in ap-southeast-2
--profile PROFILE AWS profile used to sign the upload
--expires-in SECONDS POST validity in seconds (default: 604800)
--upload-label UPLOAD_LABEL
Transfer folder under data/. Example convention:
<YYYY-MM-DD>_<Study>_ACDC_Data_Transfer
--data-type DATA_TYPE
Data type folder under the transfer. Example:
lipidomic
Example:
./issue-upload-config.py \
--bucket abcd \
--profile MyProfile \
--upload-label 2026-11-30_MCCS_ACDC_Data_Transfer \
--data-type lipidomic > curl.conf
Securely transfer the curl.conf output file to the receiver.
Used by the sender to upload files to the receiving bucket.
bashcurl >= 7.81findwithprint0support
- Obtain the
curl.conffile from the receiver and save to a location outside the source directory. - Edit
upload.shto setSOURCE_DIRandCURL_CONFIG. - Run the script:
bash upload.sh
The expected output is a reported HTTP 204 for each successful upload.