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

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

A developer has created a Java application that makes HTTP requests directly to AWS services. Application logging shows 5xx HTTP response codes that occur at irregular intervals. The errors are affecting users.
How should the developer update the application to improve the application's resiliency?

  • A. Revise the request content in the application code.
  • B. Use the AWS SDK for Java to interact with AWS APIs.
  • C. Scale out the application so that more instances of the application are running.
  • D. Add additional logging to the application code.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
hariti_crafting
Highly Voted 2 years, 7 months ago
Selected Answer: B
https://aws.amazon.com/premiumsupport/knowledge-center/http-5xx-errors-s3/ All AWS SDKs have a built-in retry mechanism with an algorithm that uses exponential backoff. This algorithm implements increasingly longer wait times between retries for consecutive error responses. Most exponential backoff algorithms use jitter (randomized delay) to prevent successive collisions.
upvoted 14 times
...
SuperPiski
Highly Voted 2 years, 7 months ago
Selected Answer: B
Very strange question. The developer has created a client that communicates with AWS services. This developer's app receives 5xx errors, which has nothing to do with the client (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses). In addition, they are sporadic errors. I don't see how scaling the client app can help with this. Of course it will help with resiliency, but if the problem is on the server it would still fail. I would go for option B, better to use the AWS SDK to interact with AWS services than implement something custom. In a practical way, I'll put logging to the application in order to check why the server is returing such error.
upvoted 10 times
...
sumanshu
Most Recent 4 months, 2 weeks ago
Selected Answer: B
A) 5xx errors are server-side errors, meaning the issue lies with AWS services, not the request content. Revising the request won't help - Eliminited C) Scaling out the application increases the number of instances, which helps handle more traffic or reduce latency. However, it doesn’t solve the issue of 5xx errors because these errors originate from AWS services, not your application. - Eliminited
upvoted 1 times
sumanshu
4 months, 2 weeks ago
D) While logging is a good practice to help diagnose issues, it won’t improve resiliency. Logging simply provides more information about the problem but doesn’t fix the 5xx errors or prevent them from impacting users. - Eliminited
upvoted 1 times
sumanshu
4 months, 2 weeks ago
B) The AWS SDKs provide built-in error handling and retry logic for interacting with AWS APIs. using exponential backoff to give the service time to recover. - Seems Valid
upvoted 1 times
...
...
...
juliolinarez
12 months ago
it should B
upvoted 1 times
...
AsmaZoheb
1 year, 3 months ago
I think so answer is B
upvoted 1 times
...
MalayShah
1 year, 9 months ago
Selected Answer: B
It should be C. Not sure why website has decided D, 5xx error is a proper failure and should not be tag to insufficient resources.
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: B
As soon as you receive an error you can retry to do the request by implementing an exponentional backoff algorithm. How it workd it tries the first time, if receive an error it tries after, let's say, 30sec. If it receives an error then it tries again after one minute and so on... In the meantime you can debug and add some log to understand the problem. I'll go for B
upvoted 1 times
...
Trimpl
1 year, 11 months ago
Selected Answer: B
Use sdk to use retry mechanism.
upvoted 1 times
...
Jingke
2 years ago
I think the correct answer is B
upvoted 1 times
...
Ramya009
2 years ago
I am very confused , how this site make the correct answer like anything .
upvoted 1 times
...
Kerata
2 years, 2 months ago
Using the AWS SDK for Java will provide a more robust and reliable approach to interact with AWS services, as it provides built-in features to handle network connectivity issues, retries, and error handling. The SDK is also designed to handle temporary errors, which could be the cause of the 5xx HTTP response codes that the application is encountering. By using the SDK, the developer can leverage AWS's best practices for error handling and retry strategies to help ensure that the application can handle intermittent connectivity issues and temporary outages. This will improve the application's overall resilience and the user experience. Revising the request content in the application code (Option A) might help to address the root cause of some errors, but it will not improve the application's overall resiliency. Scaling out the application (Option C) will not help address the root cause of the errors, and may not be necessary. Adding additional logging (Option D) might be helpful for debugging the root cause of the errors, but it will not improve the application's resiliency.
upvoted 4 times
...
Krt5894
2 years, 2 months ago
Selected Answer: B
It should be B
upvoted 1 times
...
Jay1299
2 years, 2 months ago
It is always advised to use SDKs to interact with AWS when using local/on-premise applications. And the issue is 5xx which is a server-side error code since 4xx are client side error code hence option B.
upvoted 1 times
...
gaddour_med
2 years, 3 months ago
5xx means the server undestand request (because it d'ont return 4xxx) but it cam not respond with success. so it is not a probleme about request structure but about request content. even if you change xith aws java api error can persist. the best answer is A. developer should ss data sent in request.
upvoted 1 times
...
blackwhites
2 years, 5 months ago
very clearly it is answer B https://docs.aws.amazon.com/general/latest/gr/api-retries.html
upvoted 1 times
...
Dip40
2 years, 6 months ago
So which option should be selected?. In this document correct answer and voted answers are different which is making confusion.
upvoted 4 times
...
adsdadasdad
2 years, 6 months ago
How should the developer update the application to improve the application's resiliency? I do agree that using the sdk is correct but i think what they wanted was scaling more instances. This is becuase it directly improves the applications resiliency. I think there needs to be a rework of how the question is asked
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