Configure aws-sdk-go
for R2
You must generate an Access Key before getting started. All examples will utilize access_key_id
and access_key_secret
variables which represent the Access Key ID and Secret Access Key values you generated.
This example uses version 2 of the
aws-sdk-go package. You must pass in the R2 configuration credentials when instantiating your S3
service client:
Generate presigned URLs
You can also generate presigned links that can be used to temporarily share public write access to a bucket.