Downloading via Pre-Signed URL

Last Updated At: 2025-10-21 09:10:00

Applicable Scenario

By default, buckets and objects are private. If you want any third party to be able to download an object without using CAM account or temporary keys, provide the third parties with signatures via pre-signed URLs for download operations. Anyone who receives a valid pre-signed URL can download an object.

When creating a pre-signed URL, you can include object keys in your signature to specify the objects allowed for download. You can also specify the validity period of the pre-signed URL in the program to ensure that the URL will not be used by unauthorized parties after the timeout.

Usage Instructions

Using Java SDKs

COS supports AWS Java SDK. See Using AWS S3 SDK to Access COS to access COS, and operate according to the Generating Pre-signed URLs section in the official documentation of AWS Java SDK 2.20.0.