You need to set up a RESTful API service in AWS that would be serviced via the following URL- https://democompany.com/customers?ID=1 So customers should be able to get their details whilst providing the ID to the API.
Which of the following would you define to fulfill this requirement? Choose 2 answers from the options given below.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B and C.
The ideal approach would be to define the code to get the customer information in the Lambda function.
Then attach the Lambda function to the API gateway service.
Expose the GET method in the API gateway so that users can call the API accordingly.
For more information on methods for the API gateway, please refer to the below URL-
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-request.htmlTo fulfill the requirement of setting up a RESTful API service in AWS that would be serviced via the following URL - https://democompany.com/customers?ID=1, there are a few different options available. The correct options are A and B.
Option A: A Lambda function and expose the Lambda function to the customers. Pass the ID as a parameter to the function. This option involves creating a Lambda function that can accept a customer ID as a parameter and return the relevant customer details. The Lambda function can then be exposed to customers via an API endpoint, such as an API Gateway endpoint. Customers can pass their ID as a query parameter in the URL, and the Lambda function can retrieve the details and return them in the response.
Option B: An API gateway with a Lambda function to process the customer information. This option involves setting up an API Gateway to act as a front-end for the Lambda function that processes the customer information. The API Gateway can be configured with a resource for "customers" and a GET method to retrieve the details. The Lambda function can be connected to the API Gateway via an integration, and customers can pass their ID as a query parameter in the URL to retrieve their details.
Option C: Expose the GET method in the API Gateway. This option is not sufficient on its own to fulfill the requirement. While exposing a GET method in the API Gateway is necessary, it is not enough to retrieve the customer details based on their ID.
Option D: Expose the GET method in the Lambda function. This option is also not sufficient to fulfill the requirement. While exposing a GET method in the Lambda function may be possible, it is not the recommended approach for implementing a RESTful API service in AWS. The Lambda function should be connected to an API Gateway to handle incoming requests and provide a scalable and flexible way to manage the API.