Vaccine doses and slots availability tracker

Amit Rai
2 min readMay 17, 2021

My parents in India have already taken their first vaccine shot and waiting for the second. But getting the second one seems questionable due to the unavailability of vaccine doses. India’s current covid situation, race to be vaccinated, and limited production delaying the mission to vaccinate the whole population. It is hustling for the common man, to get the availability and slots for registration. Senior citizens can walk in to get vaccinated, but the vaccine doses should be available at the vaccination center. So I thought to build a simple notification system that will check the availability of doses in nearby centers and will send an email to my father.

My requirement was to get the list of all vaccination centers and dose availability data in the district where my parents live. Cowin India has public APIs that can be used to get data as per the need, so I decided to call one of the public APIs to get data. I used Python and launched an AWS Lambda function in the Mumbai region. Lambda function will interact will API, fetch the data, will manipulate it using Pandas, and will send an email to the given email-id with the list of centers and dose availability in tabular form. It was a very simple implementation, which can be enhanced as per requirement. Python code can be found on GitHub, click here

Now the second requirement was to execute the AWS Lambda function automatically on a regular basis so I used AWS EventBridge. It is a serverless event bus that is used to build event-driven applications. Amazon EventBridge will trigger an event to execute the Lambda function at a regular interval. You can schedule it using cron format or a fixed-rate option. For sending emails, I have used the Amazon Simple Email Service (SES). It is a simple, cost-effective service to send email through the AWS cloud.

High-level Architectural Diagram

The recipient will receive an email like below

Here are few links for reference

  1. https://apisetu.gov.in/public/marketplace/api/cowin
  2. https://aws.amazon.com/eventbridge/
  3. https://aws.amazon.com/ses/
  4. https://medium.com/analytics-vidhya/vaccine-slot-notifier-using-aws-python-bbfe7dd60e84 (Nice article, I used as reference)

--

--

Amit Rai

AWS Architect | AWS DevOps | Developer | Generative AI | Enthusiastic Writer | www.linkedin.com/in/amitraikkr