SAP-C02 · Question #527
registration form for users. The website uses Amazon S3 for hosting and uses Amazon CloudFront as the content delivery network with AWS WAF configured. When the registration form is submitted, the…
The correct answer is C. Enable the CORS setting on the API Gateway API endpoint. Ensure that the API endpoint is. https://repost.aws/knowledge-center/api-gateway-cors-errors
Question
registration form for users. The website uses Amazon S3 for hosting and uses Amazon CloudFront as the content delivery network with AWS WAF configured. When the registration form is submitted, the website calls an Amazon API Gateway API endpoint that invokes an AWS Lambda function to process the payload and forward the payload to an external API call. During testing, a solutions architect encounters a cross-origin resource sharing (CORS) error. The solutions architect confirms that the CloudFront distribution origin has the Access-Control- What should the solutions architect do to resolve the error?
Options
- AChange the CORS configuration on the S3 bucket. Add rules for CORS to the AllowedOrigin
- BEnable the CORS setting in AWS WAF. Create a web ACL rule in which the Access-Control-
- CEnable the CORS setting on the API Gateway API endpoint. Ensure that the API endpoint is
- DEnable the CORS setting on the Lambda function. Ensure that the return code of the function has
How the community answered
(30 responses)- A3% (1)
- B7% (2)
- C83% (25)
- D7% (2)
Explanation
Community Discussion
No community discussion yet for this question.