AWS Certified Developer – Associate — Question 302

A company is developing a publicly accessible single-page application. The application makes calls from a client web browser to backend services to provide a user interface to customers. The application depends on a third-party web service exposed as an HTTP API. The web client must provide an API key to the third-party web service by using the HTTP header as part of the HTTP request. The company’s API key must not be exposed to the users of the web application.

Which solution will meet these requirements MOST cost-effectively?

Answer options

Correct answer: C

Explanation

A public REST API is required because the single-page application is publicly accessible from client browsers, ruling out private REST APIs (Options A and B). Using a direct HTTP integration in Amazon API Gateway (Option C) is more cost-effective and has lower latency than using an AWS Lambda proxy integration (Option D), as it avoids the additional execution costs of running a Lambda function just to append a header.