nerdexam
Amazon

DVA-C02 · Question #134

A real-time messaging application uses Amazon API Gateway WebSocket APIs with backend HTTP service. A developer needs to build a feature in the application to identify a client that keeps connecting t

The correct answer is D. Add code to track the client status in Amazon ElastiCache in the backend service. E. Implement $connect and $disconnect routes in the backend service.. Option D because by storing the client status in the cache, the backend service can quickly access the client status data without the need to query the database or perform other time- consuming operations. Option E. Implement $connect and $disconnect routes in the backend service

Submitted by naveen.iyer· Mar 5, 2026Development with AWS Services

Question

A real-time messaging application uses Amazon API Gateway WebSocket APIs with backend HTTP service. A developer needs to build a feature in the application to identify a client that keeps connecting to and disconnecting from the WebSocket connection. The developer also needs the ability to remove the client. Which combination of changes should the developer make to the application to meet these requirements? (Choose two.)

Options

  • ASwitch to HTTP APIs in the backend service.
  • BSwitch to REST APIs in the backend service.
  • CUse the callback URL to disconnect the client from the backend service.
  • DAdd code to track the client status in Amazon ElastiCache in the backend service.
  • EImplement $connect and $disconnect routes in the backend service.

How the community answered

(36 responses)
  • A
    19% (7)
  • B
    6% (2)
  • C
    11% (4)
  • D
    64% (23)

Explanation

Option D because by storing the client status in the cache, the backend service can quickly access the client status data without the need to query the database or perform other time- consuming operations. Option E. Implement $connect and $disconnect routes in the backend service: $connect and $disconnect are the reserved routes in WebSocket APIs, which are automatically called by API Gateway whenever a client connects or disconnects from the WebSocket. By implementing these routes in the backend service, the developer can track and manage the client status, including identifying and removing the client when needed.

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice