exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 374 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 374
Topic #: 1
[All AWS Certified Developer Associate Questions]

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?

  • A. Use Amazon API Gateway to create a private REST API. Create an HTTP integration to integrate with the third-party HTTP API. Add the company’s API key to the HTTP headers list of the integration request configuration.
  • B. Use Amazon API Gateway to create a private REST API. Create an AWS Lambda proxy integration. Make calls to the third-party HTTP API from the Lambda function. Pass the company's API key as an HTTP request header.
  • C. Use Amazon API Gateway to create a REST API. Create an HTTP integration to integrate with the third-party HTTP API. Add the company’s API key to the HTTP headers list of the integration request configuration.
  • D. Use Amazon API Gateway to create a REST API. Create an AWS Lambda proxy integration. Make calls to the third-party HTTP API from the Lambda function. Pass the company’s API key as an HTTP request header.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
pancman
Highly Voted 2 years, 3 months ago
Selected Answer: C
C is correct. You might wonder why is A wrong: you don't need a private REST API. Private APIs allow requests originating from the same VPC only. Since this is for a public website, you don't need that.
upvoted 9 times
...
captainpike
Most Recent 2 years, 1 month ago
Selected Answer: C
https://docs.aws.amazon.com/apigateway/latest/developerguide/setup-http-integrations.html
upvoted 1 times
...
sdafadsfa
2 years, 1 month ago
Selected Answer: B
B is right
upvoted 1 times
...
tieyua
2 years, 3 months ago
Selected Answer: C
HTTP_PROXY integration would be better, but not on the list.
upvoted 2 times
...
michele_scar
2 years, 3 months ago
Selected Answer: C
COST EFFECTIVELY = only API Gateway that can integrate the API Key in the "Method Request" HTTP Header and functions as D but without Lambda
upvoted 2 times
...
JagpreetLM10
2 years, 3 months ago
Selected Answer: D
Use Amazon API Gateway to create a REST API. Create an AWS Lambda proxy integration. Make calls to the third-party HTTP API from the Lambda function. Pass the company’s API key as an HTTP request header. This solution uses Amazon API Gateway to create a publicly accessible REST API, but the actual calls to the third-party web service are made from an AWS Lambda function. The company can securely store the API key in the Lambda function's environment variables and pass the key in the headers of the requests made from the Lambda function. This way the key is not exposed to the users of the web application. This solution is cost effective as the cost of Amazon API Gateway is calculated by the number of requests and data transfer. And Lambda is pay as you go service, so you only pay for what you use.
upvoted 1 times
pancman
2 years, 3 months ago
That would work but it wouldn't be cost-effective as lambda would be involved, creating unnecessary charges.
upvoted 2 times
tony554556
2 years, 3 months ago
good point, thanks
upvoted 1 times
...
...
...
JulietHsu
2 years, 3 months ago
Selected Answer: D
Why not go with D? No need to create private REST Api.
upvoted 1 times
pancman
2 years, 3 months ago
That would work but it wouldn't be cost-effective as lambda would be involved, creating unnecessary charges.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago