Bird
0
0

Which of the following is the correct JSON syntax to allow GET requests from any origin in an S3 bucket CORS configuration?

easy📝 Syntax Q3 of 15
AWS - API Gateway
Which of the following is the correct JSON syntax to allow GET requests from any origin in an S3 bucket CORS configuration?
A{ "CORSRules": [{ "AllowedOrigins": ["*"], "AllowedMethods": ["GET"] }] }
B{ "CORSRules": [{ "AllowedOrigins": [*], "AllowedMethods": [GET] }] }
C{ 'CORSRules': [{ 'AllowedOrigins': ['*'], 'AllowedMethods': ['GET'] }] }
D{ "CORSRules": [{ "AllowedOrigin": ["*"], "AllowedMethod": ["GET"] }] }
Step-by-Step Solution
Solution:
  1. Step 1: Check JSON keys and values

    The correct keys are "AllowedOrigins" and "AllowedMethods" with arrays of strings.
  2. Step 2: Confirm syntax correctness

    { "CORSRules": [{ "AllowedOrigins": ["*"], "AllowedMethods": ["GET"] }] } shows the correct JSON structure with proper quotes and brackets.
  3. Final Answer:

    Correct JSON syntax with AllowedOrigins and AllowedMethods arrays -> Option A
  4. Quick Check:

    JSON syntax = Correct structure [OK]
Quick Trick: Use arrays for origins and methods in CORS JSON [OK]
Common Mistakes:
MISTAKES
  • Using incorrect key names
  • Missing quotes around strings
  • Using single quotes instead of double quotes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes