Amazon S3
Sprocket supports transferring files to and from Amazon S3.
Supported Amazon S3 URLs
The following cloud storage URLs for Amazon S3 are supported:
s3schemed URLs in the forms3://<bucket>/<object>(see default region).httpsschemed URLs in the formhttps://<bucket>.s3.<region>.amazonaws.com/<object>.httpsschemed URLs in the formhttps://<region>.s3.amazonaws.com/<bucket>/<object>.
Authentication
Sprocket supports authentication to Amazon S3 using access keys.
Follow these instructions for creating a new access key for a user.
Environment variables (recommended)
Use the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables to configure Amazon S3 authentication in Sprocket.
This overrides any Amazon S3 authentication settings in sprocket.toml.
Command line options
Use the --aws-access-key-id and --aws-secret-access-key options to the sprocket run command to configure Amazon S3 authentication in Sprocket.
This overrides any Amazon S3 authentication settings in sprocket.toml.
Configuration file
Amazon S3 authentication can be configured with the run.storage.s3.auth section in sprocket.toml:
[run.storage.s3.auth]
access_key_id = "<access-key-id>"
secret_access_key = "<secret-access-key>"Warning
On Unix operating systems, it is recommended that your sprocket.toml has an access permission of 0600 if it contains secrets like Amazon S3 secret access keys.
Default region
For s3 schemed URLs, the default region is us-east-1.
The default region can be changed via the following configuration in sprocket.toml:
[run.storage.s3]
region = "<region>"Additionally, the --aws-default-region CLI option to sprocket run or the AWS_DEFAULT_REGION environment variable can be used to override the default region from configuration.