Bird
0
0

Given this CORS configuration for an S3 bucket, what will happen when a browser sends a PUT request from https://example.com?

medium📝 Predict Output Q4 of 15
AWS - API Gateway
Given this CORS configuration for an S3 bucket, what will happen when a browser sends a PUT request from https://example.com?
{"CORSRules": [{"AllowedOrigins": ["https://example.com"], "AllowedMethods": ["GET", "POST"]}]}
AThe request will succeed only if the bucket is public
BThe PUT request will succeed
CThe PUT request will be blocked by CORS policy
DThe PUT request will be redirected to GET
Step-by-Step Solution
Solution:
  1. Step 1: Analyze AllowedMethods

    The configuration allows only GET and POST methods.
  2. Step 2: Check request method

    The browser sends a PUT request, which is not allowed.
  3. Final Answer:

    The PUT request will be blocked by CORS policy -> Option C
  4. Quick Check:

    AllowedMethods excludes PUT = Request blocked [OK]
Quick Trick: AllowedMethods must include request method to allow it [OK]
Common Mistakes:
MISTAKES
  • Assuming public bucket bypasses CORS
  • Thinking PUT is allowed by default
  • Confusing CORS with HTTP redirects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes