
Answer-first summary for fast verification
Answer: Generate and assign a Cloud Storage-signed URL for the file. Make the URL available for the client to download.
The correct answer is B. Cloud Storage-signed URLs are a Google-recommended best practice for granting temporary, time-limited access to private objects in a bucket. Signed URLs include an expiration timestamp and cryptographic signature, allowing clients to download the file directly from Cloud Storage without exposing the bucket to public access. Option A is impractical due to email size limits and lack of proper expiration control. Option C is inefficient, as creating temporary buckets with lifecycle policies adds unnecessary complexity. Option D relies on HTTP cookies and custom application logic, which is less secure and scalable compared to pre-signed URLs.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How should you architect an application that enables clients to download a file from your website for a limited duration while adhering to Google Cloud's best practices?
A
Configure the application to send the file to the client as an email attachment.
B
Generate and assign a Cloud Storage-signed URL for the file. Make the URL available for the client to download.
C
Create a temporary Cloud Storage bucket with time expiration specified, and give download permissions to the bucket. Copy the file, and send it to the client.
D
Generate the HTTP cookies with time expiration specified. If the time is valid, copy the file from the Cloud Storage bucket, and make the file available for the client to download.
No comments yet.