<?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>DEV Community: Justine Mae Macario</title>
    <description>The latest articles on DEV Community by Justine Mae Macario (@bongakcsstudent).</description>
    <link>https://dev.to/bongakcsstudent</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%2F2542259%2F30dcb67a-4f88-4b6f-9dba-2838195ee331.png</url>
      <title>DEV Community: Justine Mae Macario</title>
      <link>https://dev.to/bongakcsstudent</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bongakcsstudent"/>
    <language>en</language>
    <item>
      <title>Short post test</title>
      <dc:creator>Justine Mae Macario</dc:creator>
      <pubDate>Mon, 23 Dec 2024 14:32:29 +0000</pubDate>
      <link>https://dev.to/bongakcsstudent/short-post-test-140g</link>
      <guid>https://dev.to/bongakcsstudent/short-post-test-140g</guid>
      <description>&lt;p&gt;Short post test&lt;/p&gt;

</description>
      <category>test</category>
    </item>
    <item>
      <title>Short Post Test</title>
      <dc:creator>Justine Mae Macario</dc:creator>
      <pubDate>Mon, 23 Dec 2024 14:31:42 +0000</pubDate>
      <link>https://dev.to/bongakcsstudent/short-post-test-1nnn</link>
      <guid>https://dev.to/bongakcsstudent/short-post-test-1nnn</guid>
      <description>&lt;p&gt;Short post test&lt;/p&gt;

</description>
      <category>test</category>
    </item>
    <item>
      <title>Inventory Management with AWS Lambda λ</title>
      <dc:creator>Justine Mae Macario</dc:creator>
      <pubDate>Fri, 20 Dec 2024 05:19:14 +0000</pubDate>
      <link>https://dev.to/bongakcsstudent/inventory-management-with-aws-lambda-l-pfi</link>
      <guid>https://dev.to/bongakcsstudent/inventory-management-with-aws-lambda-l-pfi</guid>
      <description>&lt;p&gt;❔&lt;em&gt;This blog describes what I did for a Simple Pharmacy Inventory Management System using AWS Lambda and other services!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📚Background: Checking and Restocking Process
&lt;/h2&gt;

&lt;p&gt;A relative who wanted to open a pharmacy soon asked me about the idea of digitizing their processes. They mentioned the dread of checking inventories and restocking during their internship, so I started with that problem by incorporating AWS Lambda. &lt;/p&gt;

&lt;p&gt;AWS Lambda lets you run code without managing servers. All that's expected from the client is the code in a language that Lambda supports. In this case, AWS Lambda is combined with AWS DynamoDB, Amazon SNS, and Amazon TimeStream.&lt;/p&gt;

&lt;h2&gt;
  
  
  📚Background: On AWS' Lambda Features
&lt;/h2&gt;

&lt;p&gt;This AWS Service is ideal for &lt;em&gt;rapid scaling&lt;/em&gt;. Lambda can be used for file processing (+ Amazon S3), stream processing (+Amazon Kinesis), and IoT/Mobile Backends (+API Requests, +AWS Amplify). A Lambda function also &lt;em&gt;runs when needed&lt;/em&gt; and &lt;em&gt;you only pay for the compute time consumed&lt;/em&gt;. &lt;/p&gt;




&lt;h2&gt;
  
  
  🔧Methods: Communication and Diagram
&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%2F1yzy2buqj8fg0sqbqvs4.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%2F1yzy2buqj8fg0sqbqvs4.png" alt="Hypothetical Scenario #100" width="800" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I &lt;em&gt;tried&lt;/em&gt; making an AWS Architecture Diagram for me and the client to grasp the concept. &lt;/p&gt;

&lt;h2&gt;
  
  
  🔧Methods: Services To Be Used
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Compute&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Lambda - update processing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DynamoDB - inventory data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS TimeStream - inventory analysis &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS SNS - notification system for stock alerts&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;API Layer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
API Gateway - receives requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Amazon Cognito - API request authentication&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon IAM - permissions and access controls for Lambda Functions &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Amazon CloudWatch - system activity monitoring and logging. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;MISC&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Pharmacy's Application - inventory update and info&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔧Methods: Deployment Process
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1.) AWS DynamoDB SetUp&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Search DynamoDB in the AWS Management Console and create a table. &lt;br&gt;
The table name depends on what the client needs so I'll use the following: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Table Name: "pha_Inventory"&lt;br&gt;
Primary/Partition Key: "idProduct" (String) &lt;br&gt;
Range/Sort Key: "quantity" (Number) &lt;/p&gt;
&lt;/blockquote&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%2Ff0ac25jlhct6esxtl2d6.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%2Ff0ac25jlhct6esxtl2d6.png" alt="Sample Table" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.) AWS SNS Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Look up SNS in the Management Console and create a topic.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Topic Type(1): Standard &lt;br&gt;
Name: "LowStockAlerts"&lt;/p&gt;
&lt;/blockquote&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%2Fkocn6v6e7isw7lqctz05.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%2Fkocn6v6e7isw7lqctz05.png" alt="Trig1" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Write down the ARNs or the Amazon Resource Names of the topic. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.) Amazon TimeStream Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Switch back to the AWS Management Console and look for TimeStream. Create the database needed for the analysis: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Configuration: Standard&lt;br&gt;
Name: "pha_Analytics"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create a table within the database: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Name: "pha_InventoryLevels" &lt;br&gt;
Components: Time, Dimensions, Measures &lt;/p&gt;
&lt;/blockquote&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%2F165fcfrls0s8p7onpmgn.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%2F165fcfrls0s8p7onpmgn.png" alt="TimeStream SetUp" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.) AWS Cognito Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This includes setting up Cognito requires creating a user pool(stores user profile information), an app client (says what certain services/apps will interact with the user pool) , and initial users(the ones who'll use the system). &lt;/p&gt;

&lt;p&gt;4.a.) User Pool &lt;/p&gt;

&lt;p&gt;Create a user pool in AWS Cognito:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sign In Attribute: Email&lt;br&gt;
User Pool Name: Inventory System Users &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4.b.) App Client&lt;/p&gt;

&lt;p&gt;Within the User Pool, add an app client.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;App Client Name: "InventoryUpdateClient"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4.c.) Initial Users&lt;/p&gt;

&lt;p&gt;In the User Pool again, create a user.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This includes placing the chosen user's email for access (pharmacist/pharmacy staff). &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;5.) IAM Role Config.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From the Management Console, click the IAM Service and create a role. You'd have to choose AWS Lambda as a trusted entity and check the following policies: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AWSLambdaBasicExecutionRole &lt;em&gt;[minimal permissions, write + execute logs]&lt;/em&gt;&lt;br&gt;
AmazonDynamDBFullAccess &lt;em&gt;[full access]&lt;/em&gt;&lt;br&gt;
AmazonSNSFullAccess &lt;em&gt;[full access]&lt;/em&gt;&lt;br&gt;
AmazonTimestreamFullAccess &lt;em&gt;[full access]&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2F3fd7e424948mq4tpexbs.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%2F3fd7e424948mq4tpexbs.png" alt="IAM Role Config" width="800" height="380"&gt;&lt;/a&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%2Fslcvg37t0auzta6vafit.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%2Fslcvg37t0auzta6vafit.png" alt="IAM Role Config" width="800" height="36"&gt;&lt;/a&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%2F2gaxogocsf5ypwkwm2df.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%2F2gaxogocsf5ypwkwm2df.png" alt="IAM Role Config" width="800" height="34"&gt;&lt;/a&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%2Fslzbvlovsqofrbtc2mps.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%2Fslzbvlovsqofrbtc2mps.png" alt="IAM Role Config" width="800" height="34"&gt;&lt;/a&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%2F27f4u7rdcxs7ieqed342.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%2F27f4u7rdcxs7ieqed342.png" alt="IAM Role Config" width="800" height="38"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.) Lambda Function&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Place the JavaScript Code found in this &lt;a href="https://github.com/bongakcsstudent/lambda_repo" rel="noopener noreferrer"&gt;Github Repository&lt;/a&gt; and update the ARNS (Amazon Resource Names) with the ones noted down.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Author from Scratch&lt;br&gt;
Name: "InventoryUpdateFunction"&lt;br&gt;
Runtime: Node.js (22.x)&lt;br&gt;
Specific Role: "LambdaInventoryUpdateRole" (IAM Role)&lt;/p&gt;
&lt;/blockquote&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%2F6sfspz7x5szsb0vlt9lx.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%2F6sfspz7x5szsb0vlt9lx.png" alt="IAM Role Config" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. DynamoDB Trigger Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This part includes adding an event trigger found in the &lt;a href="https://github.com/bongakcsstudent/lambda_repo" rel="noopener noreferrer"&gt;Repository&lt;/a&gt;. Open AWS the Lambda Console and go to functions overview. You'll see the "Add Trigger" dropdown and then choose the DynamoDB Option. Select the DynamoDB Table "pha_Inventory" and adjust the Batch Size accordingly. The starting position should be "Latest" and then enable the trigger. &lt;/p&gt;

&lt;p&gt;Here's a snap of what the code looks like:&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%2Faq7q89h3fbs6yq47it09.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%2Faq7q89h3fbs6yq47it09.png" alt="DynamoDB Trigger Setup" width="800" height="1018"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;*Note: Access Restrictions ;)&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📄Results: Testing
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;(hypothetical)&lt;/em&gt; setup is finished for a Simple Pharmacy Inventory System! &lt;/p&gt;

&lt;p&gt;Modify products in the DynamoDB Console and check if the stock alerts are sent to the AWS SNS Topic. Also, look into the CloudWatch Logs for the Lambda Triggers and the TimeStream Database for inventory updates. &lt;/p&gt;




&lt;h2&gt;
  
  
  💭Final Thoughts
&lt;/h2&gt;

&lt;p&gt;🤯 Hoping I'll improve more the next time I do this.&lt;/p&gt;




&lt;p&gt;Important Links:&lt;br&gt;
&lt;a href="https://github.com/bongakcsstudent/lambda_repo" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>awslambda</category>
    </item>
    <item>
      <title>Clicking Links and Reaching the S̶k̶y̶ Cloud</title>
      <dc:creator>Justine Mae Macario</dc:creator>
      <pubDate>Mon, 16 Dec 2024 15:35:02 +0000</pubDate>
      <link>https://dev.to/bongakcsstudent/clicking-links-and-reaching-the-sky-cloud-1lg5</link>
      <guid>https://dev.to/bongakcsstudent/clicking-links-and-reaching-the-sky-cloud-1lg5</guid>
      <description>&lt;p&gt;I hadn't planned on starting AWS in 2024. My first-year self would have found this a daunting challenge. But after joining PCS9 and making it to the finals, I wanted to maintain my momentum.&lt;/p&gt;

&lt;p&gt;Balancing extra activities, academics, and seeking opportunities was tough. I volunteered for events at my university, including GDG Baguio. I also attended any tech-related event I could find on social media.&lt;/p&gt;

&lt;p&gt;During a lull at a registration booth, I opened Facebook to update my friends. I'd seen the AWS Cloud Group before but hadn't paid much attention. Then, I saw the certification exam registration. Having previously attempted to learn Azure, I figured it might be a helpful stepping stone.&lt;/p&gt;

&lt;p&gt;I registered, knowing my limited experience in the tech field.&lt;/p&gt;

&lt;p&gt;Then, I received an unexpected email. It started with "Congratulations! You are..." and I knew something incredible had happened. The club had chosen me as one of their mentees.&lt;/p&gt;

&lt;p&gt;All that hard work had paid off, and you're probably just one click away from your success.&lt;/p&gt;

</description>
      <category>aws</category>
    </item>
  </channel>
</rss>
