• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Design a serverless Invoice Processor

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Design Billify - a serverless invoice processor.

Github repo:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Requirements

Provide an endpoint to the user to upload an invoice & his details (such as name and email). Create lambda functions that puts the invoice file into an S3 bucket & sends a message to a queue so that another function can process it & write the extracted information into ddb table.

Glossary

API Gateway: acts as a single entry point for API calls, routing client requests to the appropriate backend services while also handling tasks like authentication, authorization, and rate limiting.

Lambda: is a serverless, event-driven compute service that allows you to run code without provisioning or managing servers, focusing on code execution and scaling based on events, rather than infrastructure.

Dynamo DB: is a fully managed, serverless NoSQL database service provided by AWS that supports key-value and document data models, designed for high-performance and scalable applications.

SQS: is a fully managed message queuing service by AWS that enables developers to send, store, and retrieve messages between software components.

Textract: is a machine learning service that automatically extracts text, handwriting, and data from scanned documents, images, and PDFs.

Proposed Architecture Architecture


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Implementation Plan

  1. Implement a REST endpoint in API Gateway for POST /upload-invoice.

The user will upload the invoice along with his/her details such as name & email address.

  1. Implement the following Lambda functions -

uploadInvoice - This will receive the invoice file (.png or .jpg) and user details. It will then upload the invoice to an S3 bucket, and write the user details & the S3 key (of the invoice) to an SQS queue for the `` function process & extract further information (from the invoice).

extractBillInfo - This will receive SQS message that contains user details & invoice's S3 key and

monthlyBillAggregator - This function is triggered by an EventBridge rule that is executed on the 1st of every month. It fetches the items from the Dynamo DB table, aggregates them for each user & sends out an email via SES notifying the users of their last month's expenses/spends.

We will also have an SQS queue, and an EventBridge rule as described above.

Dynamo DB Schema

Also, we'll have a Dynamo DB table, with the following schema:

{
id: string -> Partition Key
timestamp: string (DateTime as ISO String) -> Sort Key
name: string
email: string
total: number
}

Follow me on my socials

Linkedin:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Github:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



X/Twitter:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу