AWS Builder Center
How to Build a Telemedicine Waiting Room on AWS with Amazon Chime SDK

How to Build a Telemedicine Waiting Room on AWS with Amazon Chime SDK

Design a telemedicine waiting room with AWS Lambda, DynamoDB, and Amazon Chime SDK. Keep patients outside the video session until admission and handle refreshes, cancellations, and reconnects.

Series: Healthcare (8 articles)

  1. …
  2. 7
    How to Build a Telemedicine Waiting Room on AWS with Amazon Chime SDK This article
A telemedicine waiting room can let a patient check in, test their camera and microphone, and wait for the clinician before connecting to video. Use the application to manage check-in and admission, then issue Amazon Chime SDK meeting credentials when an authorized participant is ready to join. This gives the clinic separate measures for time spent waiting in the portal and time connected to the consultation.

What happens before the patient joins the video call?

Imagine a clinic schedules a 10:00 a.m. consultation. The patient signs in at 9:54 a.m., checks their microphone, and sees that the clinician is finishing another visit. At 10:03 a.m., the clinician admits the patient. The patient joins the video session a minute later.
The portal should record those steps independently. The patient spent nine minutes between check-in and admission, then one minute getting connected. A support agent can use those timestamps to distinguish a scheduling delay from a join problem.
Event
Who or what records it
Example
Scheduled
Appointment service
Visit starts at 10:00 a.m.
Checked in
Patient portal
Patient enters the waiting room at 9:54 a.m.
Admitted
Authorized clinician or staff member
Access approved at 10:03 a.m.
Connected
Video client or verified media event, depending on the design
Patient joins at 10:04 a.m.
Cancelled
Appointment service
Visit is cancelled through an authorized workflow
For a first release, store the appointment, its current revision, and the admission status in DynamoDB. Keep connection events separate. A refresh in the patient’s browser can change its connection state while the appointment remains active.

Separate check-in, admission, and joining

An API Gateway endpoint can send requests to Lambda, where the backend checks the signed-in user and the appointment record. Give each action a specific purpose.
  1. Check in. Verify that the patient belongs to the appointment and that the clinic’s check-in window is open. Save the first successful check-in time. Refreshing the page should return the existing check-in.
  1. Admit. Verify that the clinician or staff member can manage this visit. Approve admission only while the appointment is active and the requested revision is current.
  1. Join. Check current admission and appointment status. Retrieve or create the intended meeting and obtain the attendee credentials for that participant.
  1. Reconnect. Recheck access and the active appointment revision. Reuse the valid meeting and attendee assignment where appropriate.
The patient can test supported browser devices from the waiting screen before requesting media access. Give the patient a clear way to retry microphone permissions or switch devices. Avoid sending meeting credentials in reminder emails, analytics events, or support logs.

Keep the admission decision consistent when requests overlap

A cancellation can arrive just before the clinician clicks Admit. A patient can also open the waiting room in two tabs and press Join twice. Use DynamoDB conditions to protect application state and make repeated requests safe.
An illustrative admission operation looks like this:
Admit appointment appt-demo-42
Require appointment revision = 3
Require appointment status = SCHEDULED
Require admission status = CHECKED_IN
Set admission status = ADMITTED
Record admittedAt and the authorized actor reference
If admission succeeds but the appointment is cancelled before the patient requests credentials, the join endpoint should deny the new request. A revision check also prevents a stale tab from joining a meeting connected to the old version of a rescheduled appointment.
Creating an external meeting and saving its reference involve separate systems. One approach is to claim meeting creation in DynamoDB before calling the media API, save the result, and make other requests wait for that result. Give the claim a recovery path if the worker stops halfway through. If the media API accepted a request before the worker timed out, reconcile the existing meeting before creating another one.

Plan for credentials already issued

The join endpoint can stop issuing credentials as soon as the visit is cancelled. A separate question is what happens if credentials have already reached a participant, or a call has already started.
Define the clinic’s policy for active calls. For example, an authorized staff action may close the consultation or remove an attendee through the media service. Record the outcome of that action so staff can tell whether the application cancelled the visit and whether the media session ended. Treat attendee join tokens as credentials and limit their exposure to the intended participant.

What should the clinic measure?

Start with metrics that tell the clinic where to act:
  • Check-in to admission shows how long checked-in patients waited for the clinic.
  • Admission to connection helps identify browser, permission, or network friction.
  • Join failure rate shows how often admitted patients could not connect on the first attempt.
  • Reconnect rate helps separate poor call stability from initial join problems.
  • Connected attendee-minutes help the team compare actual media usage with its cost estimate.
Report the median and a high percentile for waiting and join times. Also show how many checked-in visits never connected. If abandoned visits are excluded from the dashboard, the remaining averages can give an incomplete picture.

What should you test before launch?

Test
Expected result
Patient refreshes after checking in
The original check-in time remains
Two staff members admit the same visit
The application records one admission decision
Appointment is cancelled before credentials are issued
Join is denied
Patient returns through a tab opened before rescheduling
The backend rejects the stale appointment revision
Meeting creation succeeds but saving the reference times out
Recovery checks the existing meeting before creating another
Microphone permission is denied
The waiting screen explains how to enable it and retry
Use synthetic appointments and inspect the portal, staff view, and event records together. For a failed visit, the team should be able to locate the last successful step without viewing clinical data or revealing a join token.

Frequently asked questions

Does a patient have to join the video meeting to enter the waiting room? A portal can make the waiting room an ordinary authenticated application screen. It can show appointment status and run local device checks before the patient connects to the media session.
Should the app create a meeting as soon as the appointment is booked? For this design, create it close to the start of the visit or on the first authorized join request. This reduces the number of unused meeting records and lets the backend use the current appointment revision.
What if the patient accidentally closes the tab? Reload the appointment and admission state from the server when the patient returns. If the appointment is still active, apply the clinic’s reconnect rules and restore the intended session.
How do you tell a clinician delay from a connection problem? Compare check-in to admission and admission to connection separately. If the first interval grows, review clinic scheduling or handoffs. If the second grows, investigate the join flow and device or network errors.

Series: Healthcare (8 articles)

  1. …
  2. 7
    How to Build a Telemedicine Waiting Room on AWS with Amazon Chime SDK This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article