AWS Certified Database – Specialty — Question 114

A company is building a software as a service application. As part of the new user sign-on workflow, a Python script invokes the CreateTable operation using the
Amazon DynamoDB API. After the call returns, the script attempts to call PutItem.
Occasionally, the PutItem request fails with a ResourceNotFoundException error, which causes the workflow to fail. The development team has confirmed that the same table name is used in the two API calls.
How should a database specialist fix this issue?

Answer options

Correct answer: C

Explanation

The correct answer is C because the ResourceNotFoundException occurs when the table is not yet active after creation. By periodically checking the TableStatus with DescribeTable, the application can ensure that it only attempts to call PutItem when the table is ready. The other options do not address the timing issue related to the table's availability.