Courseiva
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is using AWS AppSync to build a GraphQL API. The API needs to allow clients to receive real-time updates when data changes in a DynamoDB table. Which AppSync feature should the developer use?

⚠ Common exam trap

Test-takers frequently confuse mutations (which trigger the update) with subscriptions (which deliver the update), leading them to select 'Mutations' instead of 'Subscriptions'.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Subscriptions

Subscriptions in AWS AppSync are the feature designed for real-time updates. They use WebSocket connections to push data to clients automatically when a mutation modifies the underlying data source, such as a DynamoDB table. By configuring a subscription on a specific mutation, the developer enables clients to receive live changes without polling.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Resolvers

    Why it's wrong here

    A resolver's primary function is to fetch or manipulate data for a specific GraphQL field by interacting with a backend data source, such as AWS Lambda, Amazon DynamoDB, or HTTP endpoints. While essential for fulfilling GraphQL operations, resolvers execute in response to a client's query or mutation request and do not inherently provide a mechanism for proactively pushing real-time data changes to subscribed clients. They are the backend logic, not the real-time communication channel.

  • Subscriptions

    Why this is correct

    AWS AppSync subscriptions are specifically designed to provide real-time, push-based data updates to clients. They leverage WebSockets to maintain a persistent connection, allowing the AppSync service to notify subscribed clients immediately when relevant data changes occur, typically triggered by a GraphQL mutation. This mechanism ensures that clients automatically receive new or modified data without needing to repeatedly poll the API.

  • Queries

    Why it's wrong here

    GraphQL queries are used to fetch data from the API in a single request-response cycle. A client sends a query, and the API returns the requested data at that specific moment. Queries are inherently stateless and do not establish a persistent connection or provide any mechanism for the server to push subsequent data changes to the client, making them unsuitable for real-time update requirements.

  • Mutations

    Why it's wrong here

    GraphQL mutations are used to modify data on the server, performing operations like creating, updating, or deleting records. While a mutation operation itself changes data, its direct response is a one-time confirmation of the change and the updated data. Mutations do not maintain a persistent connection to push subsequent real-time updates to clients; instead, they act as the trigger for AppSync subscriptions to then notify other clients about the data change.

About these practice questions

This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.