
Ultimate access to all questions.
A company hosts an unauthenticated static website at www.example.com using Amazon S3 and Amazon CloudFront with AWS WAF configured. The website includes a user registration form that, upon submission, calls an Amazon API Gateway endpoint to invoke an AWS Lambda function for processing and forwarding the payload to an external API. During testing, a solutions architect encounters a CORS error and confirms that the CloudFront origin has the Access-Control-Allow-Origin header set to www.example.com. What action should the solutions architect take to resolve the CORS error?
A
Modify the CORS configuration on the S3 bucket by adding CORS rules to the AllowedOrigin element for www.example.com.
B
Activate the CORS setting in AWS WAF and create a web ACL rule where the Access-Control-Allow-Origin header is set to www.example.com.
C
Enable the CORS setting on the API Gateway API endpoint, ensuring that all responses include the Access-Control-Allow-Origin header set to www.example.com.
D
Turn on the CORS setting on the Lambda function, making sure that the function's return code includes the Access-Control-Allow-Origin header set to www.example.com.