AWS Certified Solutions Architect – Professional (SAP-C02) — Question 4

A company uses a service to collect metadata from applications that the company hosts on premises. Consumer devices such as TVs and internet radios access the applications. Many older devices do not support certain HTTP headers and exhibit errors when these headers are present in responses. The company has configured an on-premises load balancer to remove the unsupported headers from responses sent to older devices, which the company identified by the User-Agent headers.
The company wants to migrate the service to AWS, adopt serverless technologies, and retain the ability to support the older devices. The company has already migrated the applications into a set of AWS Lambda functions.
Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct as it utilizes CloudFront to handle requests and includes a CloudFront function specifically designed to remove headers based on the User-Agent, ensuring compatibility with older devices. Option B does not use CloudFront, which is necessary for header manipulation at the edge. Option C, while involving API Gateway, misses the capability to handle header removal as efficiently as CloudFront. Option D, although similar to A, uses Lambda@Edge which is not necessary when a CloudFront function can be employed directly for this task.