This project is a serverless application that automatically processes receipt images uploaded to an Amazon S3 bucket. It uses Amazon Textract to extract structured data, stores the result in DynamoDB, and sends email notifications using Amazon SES.
A user uploads a receipt image to S3, and the system extracts data like date, total amount, vendor name, etc., then stores it and notifies the user.
- Amazon S3 β Stores uploaded receipt images.
- AWS Lambda β Serverless logic for orchestrating the workflow.
- Amazon Textract β Extracts text and data from the receipts.
- Amazon DynamoDB β Stores structured receipt data.
- Amazon SES β Sends email notifications after processing.
- π§βπΌ User uploads the receipt image to an S3 bucket.
- β‘ S3 triggers a Lambda function upon new upload.
- π Lambda invokes Textract to extract text/data from the image.
- π Textract returns structured JSON data back to the Lambda.
- ποΈ Lambda stores the extracted data in a DynamoDB table.
- π§ Lambda uses SES to send an email notification to the user.
-
Create the following AWS resources:
- An S3 bucket for uploads
- A DynamoDB table (e.g.,
ReceiptsTable) - A verified email identity in Amazon SES
- A Lambda function with appropriate IAM roles
-
Configure environment variables for the Lambda:
TABLE_NAME= name_of_the_table EMAIL_FROM=your_verified_email@example.com EMAIL_TO=user_email@example.com
-
Deploy the Lambda function and set up an S3 trigger.
Once a receipt is uploaded:
- The extracted fields (e.g., Total Amount, Vendor, Date) are stored in DynamoDB.
- An email is sent to the user with a summary.
- Make sure Amazon SES is in production mode or email identities are verified.
- Textract works best with clear, high-resolution images.
- All resources should be deployed in the same region (e.g.,
us-east-1).
