A wide-reaching architectural review & refactor with primary goals to:
Automate solution deployment as much as practical (Post-setup still requires training Rekognition, configuring A2I, and maybe a little IoT permissions debugging)
Orchestrate pipeline stages via Step Functions (rather than point-to-point integrations) for more flexible customization and separation of concerns between stages
Also includes:
A range of code quality improvements to the Lambdas/etc
A prettier (IMO!) A2I task template
Some minor extra web UI features (error messages when things break, and a table of timestamped update event history below the receipt image)
Deployed via the Amplify button and tested in same account as master demo, against the existing Rekognition model, using the sample data provided.
Known issues:
Documentation a bit rushed so will probably benefit from some additional reviews for clarity/consistency
Auto-attachment of new onboarding users to IoT Core policy is not working yet, so does require dropping back to AWS CLI to debug after stack creation
Deploying multiple OCR SAM stacks against a single Amplify (Cognito) environment can cause problems because SAM stack delete clears Cognito authRole permissions (which another SAM stack instance might still need!)
Triggering update notifications automatically from Step Function CloudWatch logs (rather than explicitly in the code of every processing step) introduces a few seconds latency/batching into the updates - but in return allows separation of the UI messaging components from the pipeline stages' code.
The confidence bar chart overlays in the A2I template are a bit ugly, and mostly included to make a philosophical point that you could consider directing reviewers' attention towards specific fields with the UI
Correlation from some original to refactored files got lost in the Git history (delete/add vs rename/modify) - especially for Lambda functions... sorry! :'(
Description of changes
A wide-reaching architectural review & refactor with primary goals to:
Also includes:
The Amplify+SAM deployment method with amplify.yml and Makefile is inspired by the official 'Serverless Airline Boooking' sample.
Testing & known issues
Deployed via the Amplify button and tested in same account as master demo, against the existing Rekognition model, using the sample data provided.
Known issues: