AWS - API GatewayWhy is it important to specify AllowedHeaders in an S3 bucket CORS configuration when your web app sends custom headers?ABecause browsers send a preflight OPTIONS request that checks AllowedHeaders before the actual requestBBecause AllowedHeaders encrypts the headers for securityCBecause AllowedHeaders increases the bucket storage sizeDBecause AllowedHeaders controls the bucket's access loggingCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand preflight requestsBrowsers send OPTIONS preflight requests to check if custom headers are allowed.Step 2: Role of AllowedHeadersAllowedHeaders tells the browser which headers are permitted in actual requests.Final Answer:Browsers send preflight OPTIONS request that checks AllowedHeaders -> Option AQuick Check:AllowedHeaders controls preflight header checks [OK]Quick Trick: AllowedHeaders must list all custom headers for preflight success [OK]Common Mistakes:MISTAKESThinking AllowedHeaders encrypts headersConfusing AllowedHeaders with storage or loggingIgnoring preflight OPTIONS requests
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