Ben Willenbring

View Original

Vaccination Card Scanner Part 2

If you’d like to try it

A card scanner app that lets you upload an image and view the result. Uses AWS textract and rekognition to determine if your file is a valid US covid vaccination card… or a picture of a cat. 😂


How it works

  • Go to the app url

  • Attach an image 5MB or less (png or jpg)

  • The app does some validation, then dispatches a GET request that sends back a pre-signed S3 URL that allows you to (temporarily) upload a specific file to a specific bucket. Pre-signed URLs are super handy. They come with expiration dates, and are generally a safe way to expose S3 bucket functionality to anonymous users.

  • When you’re ready, click the upload button. The app dispatches a PUT request, and the file is uploaded to the bucket. When the upload completes, two things happen:

    • A second pre-signed GET url is generated – this one allows you to view your uploaded image in the context of the web page (temporarily) – this too will expire

    • A lambda function is triggered which sends a Slack notification to yours truly

  • Finally, the app dispatches a POST request – this is the one that actually scans the uploaded image in the bucket. When the scan completes, the json response is displayed to the user.


☝🏽 This is a follow-up effort to this 👇🏽

Which you can read about here.