This page provides an overview of the Requester Pays feature for Google Cloud Storage. To learn how to set up and use this feature, see Using Requester Pays.
Whenever a user accesses a bucket or an object within a bucket, there are charges associated with making and executing the request. Such charges include:
Operation charges for performing a request.
Network charges for reading the data.
Data retrieval if the data is stored as Nearline Storage or Coldline Storage.
Normally, the bucket owner is billed for these access charges; however, if the requester provides a billing project with their request, that project is billed instead. With Requester Pays enabled on your bucket, you can require requesters to include a billing project in their requests, thus billing the requester's project. Enabling Requester Pays is useful, for example, if you have a lot of data you want to make available to users, but you don't want to be charged for their access to that data.
Charges not covered
The following charges are always applied to the project that contains the bucket, even if Requester Pays is enabled:
Use and access requirements
To make a bucket Requester Pays, enable the metadata flag on the desired bucket. Once enabled, only the following users can access the bucket or its contents:
Requesters who include a billing project in their request. The project used in the request must be in good standing, and the user must have a role in the project that contains the
roles/ownerroles contain the required permission.
Requesters who don't include a billing project but have
resourcemanager.projects.createBillingAssignmentpermission for the project that contains the bucket. The
roles/ownerproject role contains the required permission. Access charges associated with these requests are billed to the project that contains the bucket.
All other requests to the bucket fail with a
400 UserProjectMissing error.
In addition to these requirements, the requester must have sufficient
permission to perform the requested action. For example, a user that
provides a valid billing project in their request cannot upload objects to the
bucket unless they also have explicit permission to do so, such as by having
storage.objects.create permission for that bucket or the project that
Operations that have both a source bucket and a destination bucket, such as a copy or rewrite, charge to the project that contains the source bucket. In most cases, such as direct calls using the JSON and XML APIs, you only need to include a billing project if the source bucket has Requester Pays enabled.
In some cases, such as
gsutil rewrite, you need to include a billing
project if either the source bucket or destination bucket (or both) have
Requester Pays enabled. This is because such operations make calls to both
the source and destination buckets in the course of performing the action.
When performing an operation that requires multiple requests, such as a
multi-part upload, each request in the operation must
contain the same billing project, which you specify in the user project.
If the billing project changes between requests, the overall operation fails,
and you receive a
400 UserProjectInconsistent error.
Charges associated with including a billing project in your request do not
appear separately in your billing. For example, say you make several
downloads from a Requester Pays bucket, and you use the project
as the project to bill for the request. If
my-project also contains a bucket
from which you perform downloads, your bill only shows the total charges
for your combined downloads. It does not distinguish between the downloads
from your own bucket and those from the Requester Pays bucket.
If you wish to distinguish between charges from your own buckets and charges from including billing projects in your requests, you should create a project that contains no buckets: this project is thus dedicated to making requests to other buckets, such as those with Requester Pays enabled.