0
0
GCPcloud~10 mins

Requester pays configuration in GCP - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Requester pays configuration
Enable Requester Pays on Bucket
Requester Makes Request
Check if Requester Pays Enabled
Requester Pays Cost
Grant Access if Allowed
Data Delivered to Requester
This flow shows how enabling Requester Pays on a storage bucket shifts the cost of data access to the requester instead of the bucket owner.
Execution Sample
GCP
gsutil requesterpays set on gs://example-bucket

# Requester accesses data
gsutil -u requester-project ls gs://example-bucket
Enable Requester Pays on a bucket, then requester accesses data paying the cost.
Process Table
StepActionRequester Pays Enabled?Who Pays?Result
1Enable Requester Pays on bucketYesRequesterBucket updated to Requester Pays
2Requester tries to list bucket contentsYesRequesterRequest accepted, cost billed to requester project
3Requester tries to access data without specifying projectYesRequesterRequest denied, must specify billing project
4Requester accesses data specifying billing projectYesRequesterData delivered, cost billed to requester project
5Owner accesses bucketYesOwnerRequest accepted, cost billed to owner project
6Requester tries to access bucket without Requester Pays enabledNoOwnerRequest accepted, cost billed to owner project
7Requester tries to access bucket with Requester Pays enabled but no billing projectYesRequesterRequest denied, billing project required
💡 Requests without billing project fail when Requester Pays is enabled; otherwise, requester pays cost.
Status Tracker
VariableStartAfter Step 1After Step 2After Step 4After Step 5After Step 6
Requester Pays EnabledNoYesYesYesYesNo
Who PaysOwnerRequesterRequesterRequesterOwnerOwner
Request AllowedN/AN/AYesYesYesYes
Key Moments - 2 Insights
Why does the request fail if the requester does not specify a billing project when Requester Pays is enabled?
Because with Requester Pays enabled, the requester must specify a billing project to pay for the request. This is shown in execution_table rows 3 and 7 where requests without billing project are denied.
Who pays the cost when Requester Pays is disabled?
The bucket owner pays the cost when Requester Pays is disabled, as shown in execution_table row 6.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step does the requester successfully access data with Requester Pays enabled?
AStep 2
BStep 3
CStep 4
DStep 6
💡 Hint
Check the 'Result' column for successful data delivery with Requester Pays enabled.
According to variable_tracker, what is the value of 'Who Pays' after Step 1?
ARequester
BUnknown
COwner
DNo one
💡 Hint
Look at the 'Who Pays' row under 'After Step 1' column.
If Requester Pays is disabled, who pays the cost when a requester accesses the bucket?
ARequester
BOwner
CBoth share cost
DNo cost
💡 Hint
Refer to execution_table row 6 and variable_tracker 'Who Pays' at 'After Step 6'.
Concept Snapshot
Requester Pays configuration shifts storage access costs to the requester.
Enable with: gsutil requesterpays set on gs://bucket
Requester must specify billing project to access data.
Without billing project, requests fail when enabled.
Owner pays costs if disabled.
Useful for public datasets to avoid owner charges.
Full Transcript
Requester Pays configuration in Google Cloud Storage lets the bucket owner require that the person requesting data pays the access costs. First, the owner enables Requester Pays on the bucket. Then, when a requester tries to access data, they must specify a billing project to pay for the request. If they do not specify a billing project, the request is denied. When Requester Pays is disabled, the bucket owner pays for all access costs. This setup is useful for public datasets where the owner wants requesters to cover costs. The key steps are enabling Requester Pays, requester specifying billing project, and cost billing shifting accordingly.