
Answer-first summary for fast verification
Answer: Create a second cache behavior for the login page with unrestricted access, retaining the default behavior for private content.
The correct answer is A. By adding a second cache behavior to the distribution with the same origin as the default cache behavior and setting the path pattern for the second cache behavior to the path of the login page with unrestricted viewer access, unauthenticated users can access the login page. At the same time, the default cache behavior's settings remain unchanged, ensuring the private content remains secure because it requires signed cookies for access. This approach is confirmed by the high votes and aligns with best practices for handling such scenarios.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A developer encounters a 403 Forbidden error when accessing the login page of a file storage application served through an Amazon CloudFront distribution, which is configured to restrict viewer access and points to an S3 bucket with no public access. The application uses signed cookies post-authentication for private content access. What is the correct solution to allow unauthenticated login page access while securing private content?
A
Create a second cache behavior for the login page with unrestricted access, retaining the default behavior for private content.
B
Modify the default cache behavior for the login page with unrestricted access, and add a second behavior for the rest of the content with restricted access.
C
Utilize a failover origin in the cache behavior for the login page with unrestricted access, while keeping the primary origin for private content.
D
Adjust the S3 bucket policy for login page access and use a CloudFront function to handle unauthorized redirects to the login page URL.
No comments yet.