AWS Certified Developer Associate DVA-C02 Practice Question
Given a situation where a developer must design an API that processes payment transactions, which of the following approaches BEST ensures that the API handles repeated submissions of the same transaction in an idempotent manner?
Store the state of each transaction in a database with enforced write locks to prevent concurrent writes.
Use a stateless protocol that does not require server-side tracking of transaction states.
Generate random transaction IDs for each submission and use these IDs to detect duplicates.
Implement idempotent receipt tokens that must be submitted with each transaction.
The correct answer is to implement idempotent receipt tokens. By providing a unique token for each transaction, the system can recognize and ignore duplicate submissions. This prevents the same transaction from being processed more than once, which is the core principle of idempotency. Storing transaction states and enforcing write locks might be part of the solution but do not offer idempotency for the client's API calls. Generating random transaction IDs does not ensure idempotency because it does not prevent duplicates from being processed.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are idempotent receipt tokens and how do they work?
Open an interactive chat with Bash
Why is idempotency important in payment processing APIs?
Open an interactive chat with Bash
What is the principle of idempotency in API design?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access