Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Object Storage
    • Resolving the Bucket not empty error when deleting a bucket from Object Storage
    • Resolving errors of access to a bucket with an assigned security policy
    • Resolving error 429
    • Resolving the "409 BucketAlreadyExists" error
    • Resolving the error of access to S3 buckets from a DataProc 1.4 cluster
    • Resolving error 403 (header is not provided when using the OPTION method)
    • Resolving certificate error
    • Resolving GATEWAY_REQUEST_ERROR
    • Resolving issues with incorrect MIME-types of objects when uploading them to Object Storage
    • Moving data from an Object Storage bucket to an ice storage
    • Restricting access to an Object Storage bucket using an IP range from Cloud CDN
    • Moving bucket contents to another bucket in the same the folder
    • Accessing Object Storage API directly, bypassing the SDK
    • Viewing and deleting incomplete uploads
    • How to determine the speed of data upload and download
    • How to configure cache-control headers for objects in a bucket during HTTP requests
    • How to restrict access to a bucket for a user
    • How to connect your own domain to a bucket
    • How to change the storage class

In this article:

  • Issue description
  • Solution
  • Sample Object Storage request using curl
  1. Object Storage
  2. Accessing Object Storage API directly, bypassing the SDK

Accessing Object Storage API directly, bypassing the SDK

Written by
Yandex Cloud
Updated at March 28, 2025
  • Issue description
  • Solution
  • Sample Object Storage request using curl

Issue descriptionIssue description

You need to interact directly with Object Storage, bypassing the SDKs available for different programming languages.

SolutionSolution

The Authorization header for the service request has the format: "Authorization: AWS <key_kd>:<signature>", where:

  • Authorization: AWS: Constant value.
  • <key_id>: ID of the service account's static access key (without angle brackets).
  • <signature>: HMAC request signature using the SHA256 hashing function (without angle brackets).

Example:
Authorization: AWS YCAJEsU4EP6Dyo6QiHhPHz4dO:/CQuut9oew7fUoKorITnCcg2VlA=

Note

For more information about request signatures, see the documentation.

Sample Object Storage request using Sample Object Storage request using curl

Uploading an object to a bucket:

file='file_name' ;\
bucket='bucket_name' ;\
resource="/${bucket}/${file}" ;\
contentType="uploaded object content-type" ;\
dateValue=`date -R` ;\
stringToSign="PUT\n\n${contentType}\n${dateValue}\n${resource}" ;\
s3Key='static_access_key_ID' ;\
s3Secret='secret_key' ;\
signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64` ;\
curl -vvv -X PUT -T "${file}" \
  -H "Host: ${bucket}.storage.yandexcloud.net" \
  -H "Date: ${dateValue}" \
  -H "Content-Type: ${contentType}" \
  -H "Authorization: AWS ${s3Key}:${signature}" \
  https://${bucket}.storage.yandexcloud.net/${file}

Before sending the request, make sure to specify the following parameters:

  • file: Name of the file to be uploaded to the bucket as an object.
  • bucket: Name of the bucket to upload data to.
  • s3Key and s3Secret: ID and secret of the Static access key of the service account.
  • contentType: MIME type of the uploaded object, for example: text/plain.

Was the article helpful?

Previous
Moving bucket contents to another bucket in the same the folder
Next
Viewing and deleting incomplete uploads
© 2025 Direct Cursus Technology L.L.C.