AWS Public Sector Blog

Dr. B helps with equitable vaccine distribution using AWS

Healthcare organization Dr. B launched to get as many COVID-19 vaccines into as many arms as possible.

Healthcare organization Dr. B launched to get as many COVID-19 vaccines into as many arms as possible. To achieve its mission to make access to care—specifically the COVID-19 vaccine—more efficient and equitable, the company created a serverless solution built on Amazon Web Services (AWS).

After a simple, 2-minute sign up, Dr. B is able to send individuals text message alerts when local providers have COVID-19 vaccine doses available. For healthcare providers, Dr. B simplifies vaccine distribution to help reduce the waste of unused doses. This was particularly critical in the early days of the vaccine rollout when shots were wasted due to irregular supply and patients cancelling appointments.

Creating a vaccine solution to help millions

Dr. B has sent more than 1.1 million notifications to users about available shots.

When the United States began distributing vaccines in early 2021, each state had its own set of criteria for eligibility based on age, occupation, and pre-existing medical conditions. Many eligible individuals had difficulty securing an appointment, often spending hours or days on the task. “We saw early on that individuals had to be tech savvy to get a vaccine. To get a spot, people had to constantly refresh the page and check multiple sources. Dr. B was created to simplify this and make access to the vaccine more equitable,” said Misha Kaletsky, head of technology at Dr. B.

Dr. B solved this problem by creating a platform where vulnerable and underserved populations could sign up to a vaccine standby list to receive automatic notifications of available doses. As eligibility requirements began to ease throughout the country, Dr. B made its platform available to the general public. Since the team expected a high volume of sign ups, they had to move quickly, which led them to AWS. “We knew we needed to scale quickly, so we used AWS Lambda, AWS WAF, Amazon GuardDuty, and Amazon Aurora to make sure we could handle huge spikes in traffic and remain secure,” said Ahmet Nalcacioglu, principal engineer at Dr. B.

“We couldn’t have done it without the cloud. We didn’t want to deal with data center administration, and building on AWS made it simpler to hire the talent we needed. Developers know AWS,” added Kaletsky. With a five-person engineering team, Dr. B built a solution that scaled quickly to meet the demand in just two months.

Building a scalable and secure serverless architecture with AWS Lambda

Preparing for and handling unpredictable traffic was a design challenge. Nalcacioglu said, “We didn’t know how many people would sign up. We had to create a design that could scale as demand grows. We send priming messages asking if someone will be able to make an appointment tomorrow, and people respond immediately, so there’s an intense influx.” Dr. B utilized event-driven architecture to solve this problem.

Patient signup messages were inserted into an Amazon Simple Queue Service (Amazon SQS) queue and a back-end AWS Lambda function would process. “We used this event-driven design because queues scale elastically, have nearly unlimited throughput, and provide reliable message delivery. We controlled the rate of consumption with AWS Lambda so that it would not bog down our database. We utilized the dead-letter queue feature of Amazon SQS for failover messages.”

This queuing architecture helped Dr. B decouple the database from the front end, allowing the team to make changes to the backend while the front end could keep sending messages. “That was a big win for us to achieve a more robust architecture,” Nalcacioglu added. Unlike synchronous architecture where every component needs to scale together, in event-driven design each component can scale independently. This queue-based, event-driven architecture provided Dr. B the ability to reprocess failed messages without the need for frontend resending the messages.

Dr. B used Next.js framework for the front end, which uses Amazon CloudFront, Amazon Simple Storage Service (Amazon S3), and Lambda@Edge. Nalcacioglu mentioned, “Using AWS Lambda was seamless. There’s nothing specific we needed to know beyond the code. AWS Lambda provided high availability and scalability out of the box. The team was able to create the initial proof of concept in two weeks.”

Dr. B used Amazon Relational Database Service (Amazon RDS) Proxy between Lambda and its database to improve application performance. AWS Identity and Access Management (IAM) authentication with Amazon RDS Proxy helped avoid hard coding database credentials into the application code making it secure. “Security is everything for us. We wanted to make the application secure without the management overhead and using AWS services was the perfect solution,” said Nalcacioglu.

Dr. B used Amazon Virtual Private Cloud for the application. Security groups were used for the Lambda functions. Dr. B secured the data at rest using AWS Key Management System encryption, and the entire application was provisioned using AWS Cloud Development Kit (AWS CDK). “We used TypeScript with AWS CDK. This took infrastructure as code to another level. Spinning up a virtual private cloud used to require a team, now a single engineer can do it. That was huge for us,” he added.

What’s next for Dr.B

Dr. B is now preparing to expand into additional healthcare services in addition to getting as many people vaccinated as possible—especially in key communities with lagging vaccination rates. “We’re going to keep working on our mission of ensuring the most vulnerable populations can access the COVID-19 vaccine and improve the efficiency and equity of the healthcare system overall,” said Kaletsky.

Read more healthcare and serverless stories on the AWS Public Sector Blog.

Subscribe to the AWS Public Sector Blog newsletter to get the latest in AWS tools, solutions, and innovations from the public sector delivered to your inbox, or contact us.