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 85 discussion

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

A developer at a company recently created a serverless application to process and show data from business reports. The application's user interface (UI) allows users to select and start processing the flies. The UI displays a message when the result is available to view. The application uses AWS Step Functions with AWS
Lambda functions to process the files. The developer used Amazon API Gateway and Lambda functions to create an API to support the UI.
The company's UI team reports that the request to process a file s often returning timeout errors because of the size or complexity of the files. The UI team wants the API to provide an immediate response so that the UI can display a message while the files are being processed. The backend process that is invoked by the
API needs to send an email message when the report processing is complete.
What should the developer do to configure the API to meet these requirements?

  • A. Change the API Gateway route to add an X-Amz-Invocation-Type header with a static value of 'Event' in the integration request. Deploy the API Gateway stage to apply the changes.
  • B. Change the configuration of the Lambda function that implements the request to process a file. Configure the maximum age of the event so that the Lambda function will run asynchronously.
  • C. Change the API Gateway timeout value to match the Lambda function timeout value. Deploy the API Gateway stage to apply the changes.
  • D. Change the API Gateway route to add an X-Amz-Target header with a static value of 'Async' in the integration request. Deploy the API Gateway stage to apply the changes.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
robbyboss
Highly Voted 2 years, 4 months ago
Selected Answer: A
Reference: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-integration-async.html
upvoted 12 times
...
sumanshu
Most Recent 1 month, 2 weeks ago
Selected Answer: A
A) Correct - adding the X-Amz-Invocation-Type header with a value of 'Event' tells API Gateway to invoke the Lambda function asynchronously. The function will return immediately, and the backend process will continue in the background, allowing the UI to display the message promptly
upvoted 2 times
sumanshu
1 week, 5 days ago
D) Eliminated - X-Amz-Target specifies the name of the operation to perform. For example: DynamoDB_20120810.PutItem to add an item to a DynamoDB table. DynamoDB_20120810.GetItem to retrieve an item
upvoted 1 times
...
...
Soumya198725
1 year ago
Option : D By adding an X-Amz-Target header with a static value of 'Async' in the integration request, the API Gateway will invoke the Lambda function asynchronously. This means the API will return an immediate response to the UI while the backend processes the files. The Lambda function can then send an email when the report processing is complete1.
upvoted 1 times
...
a_win
1 year, 1 month ago
Selected Answer: D
To ensure the API provides an immediate response while handling the processing of files in the background, the best approach is to set up an asynchronous invocation between API Gateway and the backend Lambda functions. Based on the requirements, the correct option to configure the API to meet these needs is: D. Change the API Gateway route to add an X-Amz-Target header with a static value of 'Async' in the integration request. Deploy the API Gateway stage to apply the changes.
upvoted 1 times
...
megalaaa
1 year, 3 months ago
Selected Answer: D
As per latest ChatGpt answers, D fits most appropriate
upvoted 1 times
...
kashtelyan
1 year, 3 months ago
Selected Answer: D
Option A involves changing the API Gateway route to add an X-Amz-Invocation-Type header with a static value of 'Event' in the integration request. This header is typically used when you want to invoke a Lambda function asynchronously, but it doesn't ensure that you get an immediate response. It essentially sends the request to a queue for asynchronous execution and doesn't wait for the processing to complete before providing a response. In contrast, option D suggests using the X-Amz-Target header with a static value of 'Async,' which is a more appropriate choice when you need to provide an immediate response to the client while offloading the processing for background execution. This approach better aligns with the requirement of displaying a message to the user while the files are being processed, which is typically achieved through asynchronous processing with notification upon completion.
upvoted 1 times
JonasKahnwald
1 month, 2 weeks ago
Yes, with async invocation, you will get an immediate response.
upvoted 1 times
...
...
dexdinh91
1 year, 3 months ago
Selected Answer: D
I think D is the answer
upvoted 1 times
...
rcaliandro
1 year, 7 months ago
In the header of the Amazon API-Gateway, it's possible to add the value "X-Amz-Invocation-Type" set to "Event" in order to call the lambda function asynchronously. Once the lambda is called, we can send a message to the user saying that the file is processing in backround and send another notification when the asynch funcion finish to process the file and it is ready to the final user. The correct answer is A
upvoted 2 times
...
MrTee
1 year, 9 months ago
Selected Answer: A
This will configure the API Gateway route to invoke the Lambda function asynchronously, allowing it to return an immediate response to the UI while the file is being processed in the background. The Lambda function can then send an email message when the report processing is complete.
upvoted 2 times
...
PRINCE072002
1 year, 10 months ago
Selected Answer: C
c is the answer
upvoted 1 times
...
sd1399
1 year, 12 months ago
Reference: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-integration-async.html
upvoted 2 times
...
sichilam
2 years ago
A it is
upvoted 2 times
...
gunjan4392
2 years, 2 months ago
Selected Answer: A
AAAAAAAA
upvoted 2 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