AWS - API GatewayWhich 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"] }] }Check Answer
Step-by-Step SolutionSolution:Step 1: Check JSON keys and valuesThe correct keys are "AllowedOrigins" and "AllowedMethods" with arrays of strings.Step 2: Confirm syntax correctness{ "CORSRules": [{ "AllowedOrigins": ["*"], "AllowedMethods": ["GET"] }] } shows the correct JSON structure with proper quotes and brackets.Final Answer:Correct JSON syntax with AllowedOrigins and AllowedMethods arrays -> Option AQuick Check:JSON syntax = Correct structure [OK]Quick Trick: Use arrays for origins and methods in CORS JSON [OK]Common Mistakes:MISTAKESUsing incorrect key namesMissing quotes around stringsUsing single quotes instead of double quotes
Master "API Gateway" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes API Gateway - REST API creation - Quiz 15hard AWS Lambda - Event triggers for Lambda - Quiz 12easy Auto Scaling - Launch templates - Quiz 7medium Auto Scaling - Minimum, maximum, and desired capacity - Quiz 10hard Auto Scaling - Auto Scaling with ELB integration - Quiz 10hard DynamoDB - Time to live (TTL) for expiration - Quiz 15hard DynamoDB - DynamoDB Streams overview - Quiz 2easy RDS and Relational Databases - Launching an RDS instance - Quiz 14medium SNS and SQS - SNS notification types (email, SMS, Lambda) - Quiz 10hard SNS and SQS - SQS queue concept - Quiz 12easy