Course menuDVA-C02

Exams / DVA-C02 / SDKs, retries and error handling / Question 1

DVA-C02 practice question: SDKs, retries and error handling (1 of 2)

Development with AWS Services A free question from our original DVA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

A batch job calls an AWS service API from many workers at once. Under load, the calls start failing with ThrottlingException. The developer is adding custom retry logic around one of the calls. Which approach does AWS recommend?

Choose one answer.

  1. A. Retry immediately in a tight loop until the call eventually succeeds.
  2. B. Retry after a fixed one-second delay, with no upper limit on the number of attempts.
  3. C. Retry with exponential backoff and random jitter, up to a limited number of attempts.
  4. D. Treat the throttling error as permanent and fail the whole job straight away.
Show the answer and explanation

Answer: C

  • A. Wrong: Immediate retries add load to a service that is already throttling, making the problem worse.
  • B. Wrong: Fixed delays keep all workers retrying in lockstep, and unlimited attempts can run forever.
  • C. Right: Correct. Growing delays reduce pressure on the service, jitter spreads the retries out, and a cap stops endless retrying.
  • D. Wrong: Throttling is a transient error that the SDKs retry. Failing at once gives up on requests that would succeed shortly.

Explanation

AWS SDKs retry transient and throttling errors using exponential backoff with jitter. The wait grows after each attempt, and the random element stops many clients that failed together from retrying together. Custom retry code should follow the same pattern and limit the number of attempts.

Study

Keep practising

Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.