<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Anmol Pal</title>
    <description>The latest articles on Forem by Anmol Pal (@anmol111pal).</description>
    <link>https://forem.com/anmol111pal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1432835%2Fbf06d2a5-a908-4e4f-8a7e-4f176a60ecf5.jpg</url>
      <title>Forem: Anmol Pal</title>
      <link>https://forem.com/anmol111pal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/anmol111pal"/>
    <language>en</language>
    <item>
      <title>Design a serverless Invoice Processor</title>
      <dc:creator>Anmol Pal</dc:creator>
      <pubDate>Fri, 16 May 2025 09:21:35 +0000</pubDate>
      <link>https://forem.com/aws-builders/design-a-serverless-invoice-processor-1co8</link>
      <guid>https://forem.com/aws-builders/design-a-serverless-invoice-processor-1co8</guid>
      <description>&lt;p&gt;Design &lt;strong&gt;Billify&lt;/strong&gt; - a &lt;strong&gt;serverless invoice processor&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;Github repo: &lt;a href="https://github.com/anmol111pal/billify-Invoice-Processor/" rel="noopener noreferrer"&gt;https://github.com/anmol111pal/billify-Invoice-Processor/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The user will upload his/her invoices to the application throughout the month.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As soon as, the invoice is uploaded, the user gets notified about the expense via an email.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At the start of the next month (1st of the next month), the consolidated report is emailed to the user with all the expenses he has done in the past month.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Techical Requirements&lt;/strong&gt;&lt;/p&gt;

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




&lt;p&gt;&lt;strong&gt;Glossary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

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

&lt;p&gt;Textract: is a machine learning service that automatically extracts text, handwriting, and data from scanned documents, images, and PDFs.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Proposed Architecture Architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxo6sd0fdp8xobz5u6pu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxo6sd0fdp8xobz5u6pu.png" alt="Proposed Architecture design of a serverless invoice uploader" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Implementation Plan&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Implement a REST endpoint in API Gateway for &lt;code&gt;POST /upload-invoice&lt;/code&gt;. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The user will upload the invoice along with his/her details such as name &amp;amp; email address.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Implement the following Lambda functions - &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;uploadInvoice&lt;/code&gt; - 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 &amp;amp; the S3 key (of the invoice) to an SQS queue for the `` function process &amp;amp; extract further information (from the invoice).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;extractBillInfo&lt;/code&gt; - This will receive SQS message that contains user details &amp;amp; invoice's S3 key and &lt;/p&gt;

&lt;p&gt;&lt;code&gt;monthlyBillAggregator&lt;/code&gt; - 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 &amp;amp; sends out an email via SES notifying the users of their last month's expenses/spends.&lt;/p&gt;

&lt;p&gt;We will also have an SQS queue, and an EventBridge rule as described above.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Dynamo DB Schema&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Also, we'll have a Dynamo DB table, with the following schema:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
    id: string  -&amp;gt; Partition Key&lt;br&gt;
    timestamp: string (DateTime as ISO String)  -&amp;gt; Sort Key&lt;br&gt;
    name: string&lt;br&gt;
    email: string&lt;br&gt;
    total: number&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Follow me on my socials&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Linkedin: &lt;a href="https://www.linkedin.com/in/anmol-pal/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/anmol-pal/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github: &lt;a href="https://github.com/anmol111pal/" rel="noopener noreferrer"&gt;https://github.com/anmol111pal/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;X/Twitter: &lt;a href="https://x.com/anmol111pal/" rel="noopener noreferrer"&gt;https://x.com/anmol111pal/&lt;/a&gt;&lt;/p&gt;




</description>
      <category>aws</category>
      <category>serverless</category>
      <category>lambda</category>
    </item>
    <item>
      <title>Design a serverless URL Shortener leveraging AWS</title>
      <dc:creator>Anmol Pal</dc:creator>
      <pubDate>Tue, 22 Apr 2025 16:47:10 +0000</pubDate>
      <link>https://forem.com/aws-builders/design-a-serverless-url-shortener-leveraging-aws-1kl</link>
      <guid>https://forem.com/aws-builders/design-a-serverless-url-shortener-leveraging-aws-1kl</guid>
      <description>&lt;p&gt;Design a serverless URL Shortener service using AWS.&lt;/p&gt;

&lt;p&gt;Link to Github repository: &lt;a href="https://github.com/anmol111pal/URL-Shortener-using-AWS/" rel="noopener noreferrer"&gt;https://github.com/anmol111pal/URL-Shortener-using-AWS/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;Provide an endpoint where the user can request for a shortened version of a URL. Also provide an endpoint that redirects the short URL to the original URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Glossary
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proposed Design Approach
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1t07i5f3ymplih5dnkdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1t07i5f3ymplih5dnkdp.png" alt="Architecture Design of serverless URL Shortener" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation Plan
&lt;/h2&gt;

&lt;p&gt;Implement a REST API on API Gateway, that exposes two endpoints.&lt;/p&gt;

&lt;p&gt;POST &lt;code&gt;/shorten-url&lt;/code&gt; — send a URL via request body and shorten the URL.&lt;br&gt;
GET &lt;code&gt;/&amp;lt;shortUrl&amp;gt;&lt;/code&gt; — redirects the user to the original URL.&lt;br&gt;
Both the endpoints will map to a Lambda function each to process the request.&lt;/p&gt;

&lt;p&gt;We will have the following Lambda functions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;ShortenURLFunction&lt;/code&gt; — a funtion that receives the original (long) URL and generates a short ID that maps to the provided URL. This function adds this into the Dynamo DB table, and initializes the click count to 0.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;RedirectURLFunction&lt;/code&gt; — a function that receives the short URL, queries the Dynamo DB table. This function increments the click count, and redirects the user to the original URL.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Dynamo DB Schema
&lt;/h2&gt;

&lt;p&gt;{&lt;/p&gt;

&lt;p&gt;shortUrl — string&lt;/p&gt;

&lt;p&gt;url — string&lt;/p&gt;

&lt;p&gt;timestamp — DateTime&lt;/p&gt;

&lt;p&gt;clicks — integer&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Follow on my socials:&lt;/p&gt;

&lt;p&gt;Linkedin:&lt;a href="https://www.linkedin.com/in/anmol-pal/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/anmol-pal/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github: &lt;a href="https://github.com/anmol111pal/" rel="noopener noreferrer"&gt;https://github.com/anmol111pal/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;X/Twitter: [&lt;a href="https://x.com/anmol111pal%5D(https://x.com/anmol111pal" rel="noopener noreferrer"&gt;https://x.com/anmol111pal](https://x.com/anmol111pal&lt;/a&gt;&lt;/p&gt;




</description>
      <category>aws</category>
      <category>serverless</category>
      <category>lambda</category>
      <category>dynamodb</category>
    </item>
    <item>
      <title>Sentiment Analysis using AWS Comprehend &amp; Lambda</title>
      <dc:creator>Anmol Pal</dc:creator>
      <pubDate>Sat, 05 Apr 2025 07:31:25 +0000</pubDate>
      <link>https://forem.com/aws-builders/sentiment-analysis-using-aws-comprehend-lambda-46ed</link>
      <guid>https://forem.com/aws-builders/sentiment-analysis-using-aws-comprehend-lambda-46ed</guid>
      <description>&lt;p&gt;Design a serverless sentiment analysis system leveraging AWS services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Gather the input text (that could be a comment or a feedback on a survey, etc) and feed it into a compute service that figures out the sentiment from the text &amp;amp; saves it into a database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Glossary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SQS: It is a managed message queuing service that lets enables us to decouple and scale serverless applications by sending, storing, and receiving messages.&lt;/p&gt;

&lt;p&gt;Lambda: It is a serverless compute service that allows us to run code without managing servers and worrying about scaling.&lt;/p&gt;

&lt;p&gt;Comprehend: It is an NLP service that helps us extract key phrases, sentiment, PII, syntax, entities, identify language, and more.&lt;/p&gt;

&lt;p&gt;RDS: It is a managed relational DB service that simplifies setting up, operating &amp;amp; scaling relational databases on cloud (AWS).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design Solution&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbiovfsrpvxayr80jv0s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbiovfsrpvxayr80jv0s.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation Plan&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An SQS queue that stores messages and triggers Lambda function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Lambda function processes the message body and invokes Comprehend to infer the sentiment from the text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally the Lambda function stores the text and inferred sentiment into a table in RDS.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the link to the code: &lt;a href="https://github.com/anmol111pal/Sentiment-Analyzer" rel="noopener noreferrer"&gt;https://github.com/anmol111pal/Sentiment-Analyzer&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Follow me on my socials&lt;/p&gt;

&lt;p&gt;Linkedin: &lt;a href="https://www.linkedin.com/in/anmol-pal/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/anmol-pal/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github: &lt;a href="https://github.com/anmol111pal" rel="noopener noreferrer"&gt;https://github.com/anmol111pal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twitter/X: &lt;a href="https://x.com/anmol111pal" rel="noopener noreferrer"&gt;https://x.com/anmol111pal&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>lambda</category>
      <category>nlp</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
