<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aditya Pise on Medium]]></title>
        <description><![CDATA[Stories by Aditya Pise on Medium]]></description>
        <link>https://medium.com/@adityapise.0711?source=rss-b28cf753e8bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o76hmMupnwmRvbPB47WCtQ.png</url>
            <title>Stories by Aditya Pise on Medium</title>
            <link>https://medium.com/@adityapise.0711?source=rss-b28cf753e8bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:56:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adityapise.0711/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My AWS Certification Journey: How I Prepared and What I Learned Along the Way]]></title>
            <link>https://towardsaws.com/my-aws-certification-journey-how-i-prepared-and-what-i-learned-along-the-way-ddc19b5bf741?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddc19b5bf741</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Fri, 07 Nov 2025 13:58:47 GMT</pubDate>
            <atom:updated>2025-11-10T02:50:50.459Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*1JvbmFZ_Ck-quc5RDXIcRw.png" /></figure><p>Over the past few months, I earned two AWS certifications, the AWS Certified Developer Associate and the AWS Certified AI Practitioner.</p><p>Both certifications took me through a deep learning curve. What began as a goal to strengthen my understanding of the cloud soon turned into a complete shift in how I think about building systems that scale, recover, and serve users efficiently.</p><p>It was not about memorizing services or limits. It was about understanding how AWS connects everything together, from compute and networking to data storage, monitoring, and security, to create production ready architectures.</p><p>Here is how my learning journey went and what helped me the most along the way.</p><h3>Step 1: Choosing the Right Course</h3><p>I started my preparation with the Udemy courses by Stephane Maarek, which provide an excellent balance of theory and hands-on practice. He has detailed courses for almost every AWS certification, so you can choose one based on your current level and goals. You can explore all his courses here: <a href="https://www.udemy.com/user/stephane-maarek/">Stephane Maarek on Udemy</a></p><p>I followed the course in sequence, completing every hands-on lab and section carefully. After each topic, I would</p><ul><li>Read the corresponding AWS whitepaper or documentation page</li><li>Visit the official service page to check offerings, pricing, and case studies</li><li>Note important points and service limits that might appear in the exam</li></ul><p>This structured approach helped me connect concepts across services and understand how they work together in real AWS architectures.</p><h3>Step 2: Practice and Revision</h3><p>After finishing the course content, I focused on practice tests. The one included in Stephane Maarek’s course was very close to the actual exam format and difficulty.</p><p>Stephane also offers dedicated practice test courses with six full-length exams for each certification, which I found extremely helpful. I completed all six practice tests and analyzed my results carefully. For every question I missed, I reviewed the related documentation and made quick notes on what I misunderstood.</p><p>The Developer Associate exam in particular required a detailed understanding of service limits, scaling behaviors, and configuration defaults, so I revisited those sections multiple times until I felt confident.</p><h3>Step 3: Using ChatGPT for Active Recall</h3><p>After completing the course and practice tests, I used ChatGPT as an interactive study partner to strengthen my understanding through active recall. I focused on scenario-based questions that tested how well I could apply concepts rather than just remember definitions.</p><p>Some of the questions I asked included:</p><ul><li>What is the difference between ECS, EKS, and EBS and when should each be used?</li><li>What is the difference between S3 Standard and S3 Intelligent Tiering?</li><li>How does Lambda handle concurrency?</li><li>When should I use DynamoDB Streams instead of Kinesis Data Streams?</li></ul><p>Discussing these scenarios helped me connect concepts, remember small details, and improve my reasoning for real exam questions. When you actively recall and explain ideas, your understanding becomes much stronger.</p><h3>Step 4: Final Week Strategy</h3><p>During the last week of preparation, I focused on three main activities that helped me stay confident and organized:</p><ul><li>Reviewing my notes and AWS whitepapers to reinforce key concepts and best practices.</li><li>Taking one practice test again each day to stay sharp and strengthen time management before the real exam.</li><li>Reading through AWS FAQs for core services like S3, EC2, Lambda, and DynamoDB, since they often include small but important details that appear in exam questions.</li></ul><p>By exam day, I felt comfortable not just with the factual details but also with the reasoning needed for scenario-based questions. This final round of focused review helped everything come together.</p><h3>What I Learned Beyond the Exam</h3><p>Preparing for AWS certifications taught me much more than just cloud concepts. It helped me think like an engineer who designs for scale, reliability, and cost efficiency.</p><p>I now evaluate services not only by their individual features but also by how they integrate within a distributed system. This mindset has made me a better developer when working with complex architectures and real production workloads.</p><p>During this journey, I also created a complete AWS learning series titled <a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><em>Learning AWS the Practical Way: Deploy, Debug, Deliver</em></a>. It covers serverless architectures and core AWS services in depth, explaining how they connect to build scalable, production ready systems.</p><p>If you want to explore AWS services in detail with practical examples, I recommend checking out the series. It walks through everything from Lambda and DynamoDB to API Gateway, Cognito, S3, CloudFront, and CloudWatch, all explained through hands-on experience and real project insights.</p><h3>What’s Next: Generative AI on AWS</h3><p>Now I am looking forward to the AWS Certified Generative AI Developer Professional exam launching on November 18.</p><p>This certification focuses on how developers can build and deploy generative AI applications responsibly on AWS. It is an exciting opportunity to combine AI with cloud expertise and explore how these technologies shape the future of development.</p><p>If you are planning to take this certification or want to study for it together, I would love to connect. Sharing notes, projects, and study tips can make the process more fun and meaningful.</p><p>Thank you for reading. If this post helped you, feel free to share it with anyone preparing for AWS certifications.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p>You can also connect with me to talk about cloud learning, GenAI, or your own AWS journey.</p><p>#AWS #GenerativeAI #AWSCertification #CloudComputing #LearningJourney #AWSCommunity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddc19b5bf741" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/my-aws-certification-journey-how-i-prepared-and-what-i-learned-along-the-way-ddc19b5bf741">My AWS Certification Journey: How I Prepared and What I Learned Along the Way</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Buidling Spendlytic: From Prototype to Scalable Cloud-Native System on AWS]]></title>
            <link>https://towardsaws.com/buidling-spendlytic-from-prototype-to-scalable-cloud-native-system-on-aws-b905411a7500?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b905411a7500</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-eks]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 18:41:28 GMT</pubDate>
            <atom:updated>2025-11-06T03:22:30.573Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_Xm1W0ZTq2XnKLa6" /></figure><p>After coming up with the idea for Spendlytic, we built a simple backend prototype to validate the concept. The goal was to automate receipt processing and visualize spending. Once the prototype validated our idea, we turned to the real challenge of building a scalable, production-ready system in the cloud.</p><p>As part of our Engineering Cloud Computing course, we aimed to turn this into a scalable, reliable, and production-grade system built entirely in the cloud.</p><p>Which Cloud Platform Did We Choose and Why?</p><p>How Did We Plan to Make It Scalable and Reliable?</p><p>To handle increasing traffic while maintaining performance and uptime, we evaluated two options: vertical scaling and horizontal scaling .</p><p>Vertical Scaling: This approach involves running the backend on a single EC2 instance with higher compute capacity such as more CPU and memory. The advantage is that it is simpler to set up and manage.</p><p>However, it comes with clear limitations:</p><ul><li>There’s a fixed upper limit to how much one machine can handle.</li><li>It creates a single point of failure that impacts reliability.</li><li>Even when there’s little or no traffic, the high-capacity instance continues to run, leading to unused resources and unnecessary expense.</li></ul><p>Horizontal Scaling: Instead of relying on a single powerful machine, we distribute the workload across multiple smaller ones. As traffic grows, we can spin up additional instances to meet the demand.</p><ul><li>Is more fault tolerant</li><li>Adapts better to changing load</li><li>Avoids overprovisioning when traffic is low</li></ul><p>How Did We Distribute the Load Across Multiple Machines?</p><p>As we moved forward with horizontal scaling, we explored using a load balancer to efficiently manage traffic across multiple instances.</p><p>As new instances come online to handle increased demand, the load balancer automatically includes them in the routing logic. If an instance becomes unhealthy or is shut down, it is removed from the rotation to avoid service disruption.</p><p>This approach allowed us to evenly distribute traffic, improve reliability, and ensure our system scaled smoothly as demand changed.</p><p>How Did We Orchestrate Scaling Automatically?</p><p>Now that we had load balancing in place, the next question was how we could automatically manage the scaling of our backend instances based on traffic and resource usage.</p><p>Manually adding or removing machines every time the load changes is not practical. We needed a system that could handle this in real time, scaling up when needed and scaling down when demand drops.</p><p>How Did We Route External Requests into the System?</p><p>Although our architecture currently relies on a single backend service, using an API Gateway provided several key advantages:</p><ul><li>Centralized routing and traffic management</li><li>Enforcement of rate limits and authentication</li><li>Request logging and monitoring</li><li>Abstraction of backend services from direct public access</li></ul><p>While API Gateways are most commonly used in microservice architectures, they are not strictly necessary for a monolithic design like ours. However, integrating it from the beginning helped us future-proof the platform. As Spendlytic scales and we introduce more specialized services (such as authentication, analytics, or parsing), the API Gateway will be ready to manage secure and organized communication across components.</p><p>How Did We Store and Manage Structured Expense Data?</p><p>To persist the structured output from our receipt parsing pipeline including fields like vendor, date, amount, and category we needed a reliable, scalable relational database.</p><p>Amazon RDS provided us with:</p><ul><li>A fully managed relational database that removed the burden of manual setup, patching, and backups</li><li>High availability with automated failover and easy scalability Seamless integration with our backend application deployed on Kubernetes</li></ul><p>Using PostgreSQL gave us flexibility with schema design and strong support for querying complex relationships across tables. This setup ensured that structured transaction data was stored consistently with minimal operational overhead.</p><p>How Did We Store Raw Receipt Files?</p><p>While RDS handled structured data, we also needed to store the raw receipt uploads including PDFs and images submitted by users.</p><ul><li>Highly durable and scalable object storage</li><li>Simple API integration with our backend for uploading and retrieving files</li><li>Lifecycle rules and storage classes that could help reduce long term storage costs</li></ul><p>Once a receipt was uploaded by the user, it was stored in a secure S3 bucket. The backend then processed the file for OCR and parsing, while the original file remained safely stored for future reference or reprocessing. This separation of raw and processed data helped us design a clean and efficient data pipeline.</p><p>How Did We Extract Data from Receipts?</p><p>Once the receipts were uploaded and stored in Amazon S3, the next step was to extract meaningful data from them. This required building a pipeline that could process both images and PDFs and extract relevant fields such as vendor name, date, total amount, and payment mode.</p><p>We designed a two-step data extraction pipeline:</p><p>Step 1: OCR with Amazon Textract We used Amazon Textract to perform Optical Character Recognition (OCR) on the uploaded receipts. Textract accurately identified printed text and tabular data from scanned images and PDFs, making it a reliable first step in parsing receipts.</p><p>Textract returned the raw text and key-value pairs from the document, which served as input to the next stage.</p><p>Step 2: Field Extraction Using an LLM To make sense of the unstructured OCR output and extract specific fields, we integrated OpenAI’s GPT-4o Mini . The model processed the OCR text and returned clean, structured values that were ready to be inserted into the database.</p><p>This combination of Textract and GPT-4o Mini offered both flexibility and accuracy, allowing us to handle diverse receipt formats without relying on rigid rule-based logic.</p><p>How Did We Package the Backend to Tie Everything Together?</p><p>Once all major components of our architecture were in place including storage, orchestration, load balancing, and data extraction we needed a reliable way to bundle and deploy the backend application across environments.</p><p>We containerized our Flask backend using Docker, ensuring that the code, dependencies, and environment were packaged into a consistent, portable unit. This step was essential to integrate with our Kubernetes-based deployment on AWS EKS.</p><p>After building and testing the container locally, we pushed the image to Docker Hub, making it accessible to our cluster during deployment. This made it easy to manage updates, version control, and rollbacks while ensuring that the backend behaved consistently across testing and production environments.</p><p>Containerization not only simplified deployment but also unified all backend interactions with services like Amazon RDS, S3, Textract, and OpenAI’s GPT-4o Mini, making our architecture fully cloud native and production ready.</p><p>Final Architecture for Spendlytic</p><p>How Did We Monitor the System in Real Time?</p><p>Once the application was deployed on EKS, we needed real-time visibility into its performance, behavior, and resource usage.</p><p>We used Amazon CloudWatch to track metrics across our backend services and infrastructure. It allowed us to monitor CPU and memory usage of individual pods, observe scaling activity, and ensure the system remained healthy under changing loads.</p><p>We configured custom dashboards to track request volume, latency, and container-level resource consumption. During load testing, CloudWatch clearly showed our EKS pods scaling from two to four replicas as traffic increased, confirming that our autoscaling setup was working as intended.</p><p>CloudWatch gave us a comprehensive view into system health and performance. It helped us detect anomalies early, fine-tune resource allocation, and maintain reliability as we improved the platform.</p><p>Spendlytic began as a small prototype to solve a real problem for helping international students like me track expenses easily. Over time, it evolved into a fully cloud-native platform, giving us hands-on experience with scalable architecture, container orchestration, automated data extraction, and real-time monitoring.</p><p>This project was built with learning and impact in mind, and it’s just the beginning. We’re continuing to improve it with features like OAuth login, shared group tracking, and performance tuning for the parsing pipeline.</p><p>📂 Explore the full project 🔗 <a href="https://www.linkedin.com/redir/redirect?url=https%3A%2F%2Fgithub%2Ecom%2Fanpise%2FSpendlytic&amp;urlhash=R5v8&amp;trk=article-ssr-frontend-pulse_little-text-block">GitHub Repository</a></p><p>If you’re interested in collaborating, testing it out, or sharing feedback, I’d love to connect.</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/buidling-spendlytic-from-prototype-scalable-system-aws-aditya-pise-pyj0f?trackingId=X%2BMfpD3hR2Wiy9Ekq%2FfNMA%3D%3D&amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_detail_base%3BM9tF6rGER%2BSvVTP3%2BzRe8w%3D%3D"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b905411a7500" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/buidling-spendlytic-from-prototype-to-scalable-cloud-native-system-on-aws-b905411a7500">Buidling Spendlytic: From Prototype to Scalable Cloud-Native System on AWS</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning AWS the Practical Way — Building a Complete Serverless Application]]></title>
            <link>https://aws.plainenglish.io/learning-aws-the-practical-way-building-a-complete-serverless-application-22b3aab78b5d?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/22b3aab78b5d</guid>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Tue, 28 Oct 2025 12:01:52 GMT</pubDate>
            <atom:updated>2025-11-13T01:49:58.065Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learning AWS the Practical Way — Building a Complete Serverless Application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*7ELQnirBXIbK72ti2J8k_Q.png" /></figure><p>I started a series called <a href="https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way</strong></a>. The idea is simple: I explore AWS services by building with them and sharing what I learn. Each post focuses on one service, dives into how it works, and shows how it connects into a real application.</p><p>In the previous parts, we built and deployed the complete architecture of our <strong>JobTrackr</strong> application. With <strong>AWS Lambda</strong>, <strong>Amazon DynamoDB</strong>, <strong>API Gateway</strong>, and <strong>Amazon Cognito</strong>, we created a backend that is secure, serverless, and fully managed. <strong>Amazon S3</strong> and <strong>Amazon CloudFront</strong> then helped us host the frontend and deliver it seamlessly across the globe. Finally, <strong>Amazon CloudWatch</strong> added observability to monitor performance, detect issues, and maintain system health.</p><p>Through this journey, we explored how these AWS services come together to form a complete, reliable, and cost-efficient serverless system from deployment to debugging to delivery.</p><p>In this final part, we will take a step back to look at the bigger picture. We will revisit key lessons from each service, highlight what makes this architecture effective, and wrap up the series with some closing reflections on building end-to-end serverless applications on AWS.</p><h3>The Application</h3><p>To bring the series to life, I built <strong>JobTrackr</strong>, a simple web application that demonstrates how different AWS services can work together in a real system. The goal was to create something practical and hands on, a complete project that connects compute, storage, authentication, and monitoring in a fully serverless setup.</p><p>JobTrackr helps users save, track, and analyze job postings they find online. It includes a Chrome Extension for quick job saves and a dashboard where users can manage listings. Behind the scenes, everything runs entirely on AWS.</p><p>The architecture connects:</p><ul><li><strong>Amazon API Gateway</strong> → routes requests from the frontend</li><li><strong>AWS Lambda</strong> → processes job data and interacts with</li><li><strong>Amazon DynamoDB</strong> → storing titles, companies, and links</li><li><strong>Amazon Cognito</strong> → handles user authentication</li><li><strong>Amazon S3 + CloudFront</strong> → host and deliver the frontend globally</li><li><strong>Amazon CloudWatch</strong> → monitors logs, metrics, and performance</li></ul><p>The result? A <strong>lightweight, scalable, and cost-efficient</strong> serverless app that ties together compute, storage, authentication, and monitoring everything a modern cloud solution needs.</p><h4><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6">Part 1 : AWS Lambda</a></h4><p>The series began with <strong>AWS Lambda</strong>, the foundation of any serverless application. Lambda removes the need to manage servers and lets you focus entirely on the code. It runs your functions only when an event occurs, making it a simple way to build small, event-driven applications that respond instantly when needed.</p><p>In this part, I explored how Lambda fits into a serverless system and how it connects with other AWS services. For JobTrackr, Lambda became the core backend service that handled API requests, processed job URLs from the Chrome Extension, and interacted with DynamoDB for storage. I configured IAM roles, added environment variables, and used CloudWatch logs to test and debug the functions step by step.</p><p>The key takeaway was that Lambda makes it easy to focus on logic instead of infrastructure. It automatically handles execution, scaling, and performance, allowing developers to build faster and experiment more confidently.</p><h4><a href="https://medium.com/aws-in-plain-english/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c">Part 2 : Amazon DynamoDB</a></h4><p>Once the compute layer was ready with Lambda, the next step was to add a place to store and retrieve data. That is where <strong>Amazon DynamoDB</strong> came in. DynamoDB is a fully managed NoSQL database that automatically scales with your application. It is fast, serverless, and designed to handle data at any scale without worrying about infrastructure.</p><p>In this part, I explored how DynamoDB organizes data into tables, items, and attributes, and how its design differs from traditional relational databases. For JobTrackr, DynamoDB stored job details like title, company, and link, allowing Lambda to read and write data quickly. I also learned how to define partition keys, manage access with IAM roles, and use the boto3 client in Python to connect Lambda with DynamoDB.</p><p>The key takeaway was how naturally DynamoDB fits into a serverless system. It eliminates database maintenance, scales automatically, and integrates smoothly with services like Lambda and API Gateway, making data handling both simple and reliable.</p><h4><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-part-3-building-secure-apis-with-amazon-api-gateway-and-amazon-e6c7913f0425">Part 3 : API Gateway + Cognito</a></h4><p>With compute and storage in place, the next step was to make the application accessible and secure. That is where <strong>Amazon API Gateway</strong> and <strong>Amazon Cognito</strong> came in. API Gateway acts as the front door to serverless applications, routing requests from the frontend to the backend. Cognito adds authentication and user management without the need to build a custom login system.</p><p>In this part, I learned how to create REST APIs in API Gateway, connect them to Lambda functions, and define methods for sending and receiving data. For JobTrackr, API Gateway managed routes such as posting job URLs or fetching saved listings, while Cognito handled user sign-up, sign-in, and token-based authentication. I also configured authorizers in API Gateway to validate tokens and ensure secure access for each user.</p><p>The key takeaway was how naturally these two services complement each other. API Gateway provides a secure and scalable API layer, while Cognito simplifies authentication and access control. Together, they made the backend ready for real users and turned the project into a complete, secure application.</p><h4><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-part-4-hosting-app-with-amazon-s3-and-cloudfront-475f822ee050">Part 4 : S3 + CloudFront</a></h4><p>Once the backend was ready, the next step was to make the application accessible through a simple and reliable frontend. For this, I used <strong>Amazon S3</strong> to host the web dashboard and <strong>Amazon CloudFront</strong> to deliver it quickly to users worldwide.</p><p>Amazon S3 provided an easy way to store and serve the static files for the JobTrackr dashboard, such as HTML, CSS, and TypeScript. I configured the bucket for static website hosting and uploaded the build files. To improve performance and reliability, I added CloudFront, AWS’s global content delivery network, which caches content closer to users for faster access.</p><p>In this part, I learned how these two services work together to provide a smooth hosting experience. I explored how to set cache rules, enable HTTPS, and manage content updates efficiently. The setup was lightweight, secure, and cost effective and a perfect fit for a serverless project.</p><p>The main takeaway was how simple it is to host and scale a frontend using AWS. With just S3 and CloudFront, the JobTrackr dashboard became globally available and highly performant, completing the user facing part of the application.</p><h4><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-part-5-monitoring-and-observability-with-amazon-cloudwatch-48431eb6035c">Part 5 : Amazon CloudWatch</a></h4><p>The final part of the series focused on <strong>Amazon CloudWatch</strong>, the service that brings visibility into how everything in the system works together. CloudWatch collects logs, metrics, and events from services like Lambda, API Gateway, and DynamoDB, helping monitor application performance and troubleshoot issues.</p><p>For JobTrackr, I used CloudWatch to track the health of Lambda functions, monitor API calls, and set alarms for failed requests or higher latency. Viewing detailed logs and metrics gave me a better understanding of how different services interacted and where performance could be improved.</p><p>This part showed how important monitoring is for any production ready system. CloudWatch makes it easy to visualize data, detect errors early, and debug issues efficiently. With this final step, the JobTrackr system became complete, fully observable, and ready to scale confidently.</p><h3>Final Reflections</h3><p>After earning my AWS certifications, I wanted to go beyond the exams and connect all the pieces through something practical. That is how this series came to life.</p><p>Each part built upon the last, gradually forming a complete end-to-end serverless application. From Lambda to DynamoDB, API Gateway and Cognito, S3 and CloudFront, and finally CloudWatch, every service had a purpose, and together they painted the bigger picture of how AWS enables scalable, secure, and cost-efficient systems.</p><p>The biggest lesson is that serverless is not about removing servers it is about removing friction. It lets you focus on what truly matters: building, experimenting, and solving real problems.</p><p>Learning by building changed how I view cloud development. Each debugging session, log trace, and successful deployment made the process more rewarding and real.</p><p>Thank you for following along this journey.<br>Stay tuned, there is more to come as I continue exploring, building, and sharing how AWS powers the modern cloud.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way Series</strong></a><strong> </strong>→ This post is final part of my series. You can start from the beginning here to follow along as we explore the broader serverless ecosystem.</p><p><a href="https://github.com/anpise/JobTrackr"><strong>GitHub</strong></a> → You can explore the complete source code and demo video on my GitHub.</p><p>Have you tried Amazon CloudWatch before? What’s your favorite (or most challenging) use case? Share in the comments, I’d love to hear and compare experiences.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries #CloudFront #S3</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22b3aab78b5d" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-aws-the-practical-way-building-a-complete-serverless-application-22b3aab78b5d">Learning AWS the Practical Way — Building a Complete Serverless Application</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning AWS the Practical Way — Part 5: Monitoring and Observability with Amazon CloudWatch]]></title>
            <link>https://aws.plainenglish.io/learning-aws-the-practical-way-part-5-monitoring-and-observability-with-amazon-cloudwatch-48431eb6035c?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/48431eb6035c</guid>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[cloudwatch]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Sun, 19 Oct 2025 16:01:53 GMT</pubDate>
            <atom:updated>2025-11-04T18:47:41.836Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learning AWS the Practical Way — Part 5: Monitoring and Observability with Amazon CloudWatch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*IRAiClUZR1eODV3_adseug.png" /></figure><p>I started a series called <a href="https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way</strong></a>. The idea is simple: I explore AWS services by building with them and sharing what I learn. Each post focuses on one service, dives into how it works, and shows how it connects into a real application.</p><p>In the previous parts, we built and deployed the complete architecture of our JobTrackr application. With <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6"><strong>AWS Lambda</strong></a>, <a href="https://medium.com/@adityapise.0711/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c"><strong>DynamoDB</strong></a>, <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-3-building-secure-apis-with-amazon-api-gateway-and-amazon-e6c7913f0425"><strong>API Gateway, and Cognito</strong></a>, we created a backend that is secure, serverless, and fully managed. <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-4-hosting-app-with-amazon-s3-and-cloudfront-475f822ee050"><strong>Amazon S3 and CloudFront</strong></a> then helped us host the frontend and deliver it seamlessly across the globe.</p><p>Now that the application is up and running, the next important step is to keep an eye on how it behaves. How do we know if an API Gateway endpoint is failing, the number of error requests is increasing, or a Lambda function is taking longer to respond than usual?</p><p>That is where Amazon CloudWatch comes in. CloudWatch provides real-time observability into your AWS environment by collecting metrics, logs, and events from almost every service you use. Whether you want to track performance, troubleshoot issues, or set automated alerts, CloudWatch is the tool that keeps your application transparent and reliable.</p><p>In this post, we take a closer look at Amazon CloudWatch, explore how it works behind the scenes, and learn how it keeps your cloud applications healthy and performant.</p><p><strong>In this article, we will cover:</strong></p><ul><li><strong>What is Amazon CloudWatch</strong></li><li><strong>A brief history of CloudWatch</strong></li><li><strong>Monitoring and observability options in AWS</strong></li><li><strong>Common Use Cases and Who Uses CloudWatch</strong></li><li><strong>Strengths, weaknesses, and pricing explained</strong></li><li><strong>Best practices for effective monitoring</strong></li><li><strong>A demo of setting up CloudWatch metrics, logs, and alarms for JobTrackr</strong></li></ul><h3>What is Amazon CloudWatch</h3><p>Amazon CloudWatch is a monitoring and observability service that helps you collect, view, and analyze data from your AWS environment. It brings together metrics, logs, and events from different AWS services, giving you a complete view of how your applications and infrastructure are performing. With CloudWatch, you can monitor usage, detect issues, and respond to changes automatically, all from one place.</p><p>CloudWatch continuously gathers data from services such as EC2, Lambda, API Gateway, and DynamoDB. It tracks metrics like CPU utilization, request counts, and latency while also storing detailed logs that record what is happening inside your applications. This helps you understand both the overall system health and the reasons behind performance issues.</p><p>Data in CloudWatch is organized into three parts:</p><ul><li><strong>Namespaces:</strong> Group related metrics together, such as all metrics for a specific service or application.</li><li><strong>Metrics:</strong> Represent numerical values that change over time, like CPU utilization, error rates, or memory usage.</li><li><strong>Dimensions:</strong> Act as labels that help you filter and analyze metrics by attributes such as instance ID, region, or function name.</li></ul><p>CloudWatch is deeply integrated with AWS, so most services publish metrics automatically. You can also push <strong>custom metrics</strong>, set alarms, build dashboards, and trigger automated actions to keep your systems running efficiently. In simple terms, CloudWatch acts as the central nervous system of your AWS environment, helping you maintain performance, reliability, and visibility across your applications.</p><h3>A brief history of CloudWatch</h3><p>Amazon CloudWatch was launched in <strong>May 2009</strong> as one of AWS’s early infrastructure services. Over the years, it has evolved from a simple EC2 monitoring tool into a comprehensive observability platform that powers modern cloud applications.</p><p>In its early phase from <strong>2009 to 2010</strong>, CloudWatch was introduced alongside Auto Scaling and Elastic Load Balancing to provide built-in monitoring for EC2 instances. It tracked key metrics such as CPU usage, disk I/O, and network traffic, removing the need for manual monitoring tools and giving developers instant visibility into their infrastructure.</p><p>Between <strong>2011 and 2015</strong>, AWS expanded CloudWatch’s capabilities beyond basic metrics. The addition of custom metrics and alarms allowed teams to monitor application specific data and automate responses to performance changes. <strong>CloudWatch Logs</strong> arrived in 2014, enabling centralized log collection and analysis, while <strong>Dashboards </strong>introduced in 2015 made it possible to visualize metrics across multiple services from a single console.</p><p>From <strong>2016 to 2019</strong>, CloudWatch entered a new era of observability. The launch of <strong>CloudWatch Events</strong>, later renamed EventBridge, enabled automation and event driven workflows, while Logs Insights added a fast, interactive way to query logs. Features such as Anomaly Detection, ServiceLens, and Synthetics Canaries allowed developers to correlate metrics, logs, and traces for faster troubleshooting and better visibility across distributed systems.</p><p>Between <strong>2020 and 2023</strong>, CloudWatch evolved to support modern, distributed architectures such as containers and serverless applications. Container Insights, Lambda Insights, and Real User Monitoring brought deeper visibility into microservices and end user experiences. With Cross Account Observability, OpenTelemetry integration, and machine learning based insights, teams could monitor large scale AWS environments more efficiently than ever before.</p><p>Since <strong>2024</strong>, CloudWatch has moved toward intelligent observability. New capabilities like Application Signals and generative AI based monitoring are designed to automatically detect anomalies, identify performance patterns, and deliver proactive insights across complex systems.</p><p>From its beginnings as a basic EC2 monitoring service to its current role as a full stack observability platform, CloudWatch has become one of the most essential tools for maintaining performance, reliability, and visibility across the AWS ecosystem.</p><h3>Monitoring and Observability in AWS</h3><p>Monitoring and observability are essential for maintaining reliable cloud applications. As systems scale across multiple services and regions, tracking performance, availability, and user experience becomes critical. AWS offers a set of services that work together to give developers complete visibility into their applications and infrastructure.</p><p>At the center of this ecosystem is <strong>Amazon CloudWatch</strong>, the primary service for monitoring metrics, collecting logs, and creating alarms. It provides real time visibility into how your applications are performing and helps detect issues before they affect users. CloudWatch gathers data from nearly every AWS service, making it the foundation of monitoring within AWS.</p><p>Other services extend CloudWatch’s capabilities to create a full observability stack:</p><p><strong>AWS X-Ray:</strong> Provides distributed tracing to show how requests move through microservices and serverless applications. It helps identify bottlenecks, latency issues, and dependencies between components.</p><p><strong>AWS CloudTrail:</strong> Records all API calls and user activities across your AWS environment for auditing and security analysis. It allows you to track who made a change, when it happened, and from where.</p><p><strong>AWS Config:</strong> Monitors and records configuration changes of AWS resources. It evaluates them against compliance rules to ensure your infrastructure remains secure and properly configured.</p><p><strong>Amazon EventBridge:</strong> Routes real time events from CloudWatch or other AWS sources to automation workflows. It can trigger actions such as invoking a Lambda function or running a Systems Manager automation when an alarm or event occurs.</p><p>In addition to these core services, AWS also provides specialized tools that build on CloudWatch data. <strong>Amazon DevOps Guru</strong> uses machine learning to detect operational anomalies automatically. The <strong>AWS Health Dashboard</strong> reports ongoing or upcoming service events that could affect your workloads. Tools like <strong>Compute Optimizer</strong> and <strong>Cost Explorer</strong> analyze CloudWatch metrics to recommend better resource sizing and cost efficiency.</p><p>Together, these services form the foundation of monitoring and observability in AWS. CloudWatch collects and correlates the data, while tools like X-Ray, CloudTrail, Config, and EventBridge extend its capabilities with tracing, auditing, compliance, and automation. Whether you use only AWS native services or integrate open source tools like Prometheus and Grafana, CloudWatch remains the central hub that connects them all, providing a unified view of your system’s health and performance.</p><h3>Common Use Cases and Who Uses CloudWatch</h3><p>Amazon CloudWatch is used by developers, DevOps engineers, and enterprises to monitor the performance, reliability, and cost of their AWS resources. Since it is enabled by default for most AWS services, it is useful for both beginners managing a few workloads and teams operating large-scale systems.</p><p><strong>Infrastructure monitoring: </strong>CloudWatch gives real time visibility into AWS resources such as EC2, RDS, and Load Balancers. It tracks CPU, memory, and network metrics to detect issues early. Alarms can automatically scale resources or replace unhealthy instances, and the CloudWatch Agent can even collect data from on-premise servers.</p><p><strong>Application monitoring: </strong>Developers use CloudWatch to track latency, error rates, and request volumes across applications. Tools like CloudWatch Synthetics simulate user activity, while Real User Monitoring (RUM) captures data from real users to ensure fast and reliable experiences.</p><p><strong>Serverless and container observability: </strong>CloudWatch automatically collects logs and metrics from AWS Lambda functions, ECS tasks, and EKS pods. With Lambda Insights and Container Insights, teams can monitor performance, optimize resources, and troubleshoot issues faster.</p><p><strong>Log management and analysis: </strong>CloudWatch Logs centralizes logs from all AWS services, allowing engineers to search and analyze them using Logs Insights. It helps identify errors, unusual patterns, or slow requests without needing to log into individual servers.</p><p><strong>Alerts and automation: </strong>CloudWatch Alarms notify teams when something goes wrong, such as a spike in latency or failed requests. Using anomaly detection and automation, CloudWatch can take corrective actions like restarting services or invoking recovery workflows.</p><p><strong>Cost and capacity optimization: </strong>CloudWatch data helps teams understand usage trends and plan for growth. Services like Compute Optimizer and Cost Explorer use CloudWatch metrics to make right-sizing and cost-saving recommendations.</p><p>Some popular examples include <strong>Expedia Group</strong> using CloudWatch to monitor thousands of applications globally, <strong>Adobe</strong> tracking performance across its cloud-based creative tools, and <strong>Canva</strong> ensuring uptime and smooth performance for millions of users. These examples show how CloudWatch helps companies of all sizes keep their systems reliable, scalable, and efficient in the cloud.</p><p>CloudWatch brings all these use cases together by helping you monitor, analyze, and act on your application and infrastructure data. It provides the visibility and automation needed to keep your AWS environment reliable, efficient, and well optimized.</p><h3>Strengths, Weaknesses, and Pricing Explained</h3><h4>Strengths</h4><ul><li><strong>Deep AWS integration:</strong> CloudWatch automatically gathers metrics, logs, and events from nearly every AWS service including EC2, Lambda, RDS, and DynamoDB. This gives users instant visibility into system health without needing manual configuration or third-party tools.</li><li><strong>Fully managed and highly scalable:</strong> It can handle millions of data points and log events per minute while AWS manages all the backend infrastructure. Teams don’t need to worry about maintenance, scaling, or data storage.</li><li><strong>Unified observability platform:</strong> CloudWatch combines metrics, logs, alarms, and events in one place, helping teams move seamlessly from detection to troubleshooting. With ServiceLens and X-Ray integration, it provides a complete view across distributed systems.</li><li><strong>Feature-rich and intelligent:</strong> It offers advanced tools like Logs Insights for querying logs, Metric Math for combining metrics, Contributor Insights for finding top contributors, and Anomaly Detection for learning normal behavior patterns automatically.</li><li><strong>Extensive ecosystem and flexibility:</strong> CloudWatch integrates with open-source and third-party platforms like Grafana and Prometheus, allowing data sharing across dashboards and enterprise observability pipelines. It also supports hybrid monitoring by collecting data from on-premise and custom applications through agents and APIs.</li><li><strong>Strong automation and alerting:</strong> Alarms can trigger AWS Lambda, SNS notifications, or auto-scaling actions, enabling quick responses and self-healing workflows without human intervention.</li></ul><h4><strong>Weaknesses</strong></h4><ul><li><strong>Costs can rise at scale:</strong> While affordable for smaller workloads, the cost of metrics, logs, and alarms can grow significantly in large environments. Retaining large log volumes or creating too many custom metrics often drives up expenses if not managed carefully.</li><li><strong>AWS-centric limitations:</strong> CloudWatch works best inside AWS. Monitoring external systems, on-premise setups, or multi-cloud environments requires agents or integrations, which can add complexity.</li><li><strong>Learning curve and interface complexity:</strong> The CloudWatch console can be overwhelming for new users. Features like Logs Insights use custom query languages, which require time to learn. Although AWS has improved usability, beginners may still need time to adapt.</li><li><strong>Data limits and slight delays:</strong> Some metrics and log queries have service quotas and short processing delays. Real-time, sub-second visibility is limited, which might not suit ultra-low-latency use cases.</li><li><strong>Less specialized analytics:</strong> While CloudWatch covers most monitoring needs, dedicated log or APM tools (like Elastic Stack or Datadog) may offer deeper visualization or user analytics capabilities.</li></ul><p>While CloudWatch’s strengths make it a reliable choice for most AWS workloads, understanding its limitations and pricing helps teams plan and optimize usage effectively.</p><h4>Pricing Explained</h4><p><strong>Free Tier</strong><br>Amazon CloudWatch follows a pay-as-you-go model, but many of its basic monitoring features are free. Every AWS account automatically includes CloudWatch’s free tier, which provides:</p><ul><li><strong>Basic metrics</strong> for most AWS services, such as CPU utilization and request counts.</li><li><strong>10 custom metrics</strong> per month.</li><li><strong>5 GB of log ingestion</strong> and <strong>5 GB of log storage</strong> each month.</li><li><strong>3 dashboards</strong> per account.</li><li><strong>10 alarms</strong> and <strong>1,000 Amazon EventBridge events</strong> per month.</li></ul><p>These features are enough for small projects or for learning how CloudWatch works. Most new AWS users can start monitoring applications without incurring any cost.</p><p><strong>Paid Usage and Cost Breakdown</strong><br>When you go beyond the free tier, CloudWatch pricing depends on what you use such as metrics, logs, alarms, dashboards, and optional features. Each is billed separately so you only pay for what you need.</p><ul><li><strong>Metrics:</strong> Custom or detailed metrics cost about <strong>$0.30 per metric per month</strong> for the first 10,000 metrics, with lower rates at higher volumes. Built-in metrics for AWS services (like EC2 or RDS) are free at 5-minute intervals.</li><li><strong>Logs:</strong> You pay <strong>$0.50 per GB</strong> of log data ingested and <strong>$0.03 per GB per month</strong> for storage. Setting log retention policies helps control costs.</li><li><strong>Alarms:</strong> Each alarm costs about <strong>$0.10 per month</strong>, or <strong>$0.30</strong> if anomaly detection is enabled.</li><li><strong>Dashboards:</strong> The first three are free, and each additional dashboard costs <strong>$3 per month</strong>.</li><li><strong>Additional features:</strong> Tools like <strong>CloudWatch Synthetics</strong>, <strong>Real User Monitoring</strong>, and <strong>Metric Streams</strong> charge per use or event, usually adding a few dollars per month depending on frequency.</li></ul><p>For most workloads, CloudWatch remains cost-effective. Small applications often stay within a few dollars a month, while larger systems benefit from the scalability, automation, and reliability that CloudWatch provides. Its flexible, pay-as-you-go pricing makes it easy to start small, expand as needed, and only pay for what you actually use.</p><h3>Best Practices for Effective Monitoring</h3><p>To get the most value from Amazon CloudWatch, it helps to follow a few simple practices that keep your monitoring setup reliable, efficient, and easy to manage. These guidelines ensure you track what matters, stay alerted to real issues, and avoid unnecessary costs.</p><p><strong>Focus on key metrics and alarms</strong><br>Track only the metrics that reflect your application’s health, such as latency or error rates. Use anomaly detection and smart thresholds to reduce false alerts and focus on real issues.</p><p><strong>Create clear dashboards</strong><br>Build dashboards that group related metrics together for quick insights. Use variables to switch between services, regions, or environments easily.</p><p><strong>Manage logs efficiently<br></strong>Organize logs by application or environment and set retention limits to control storage costs. Use Logs Insights to query issues quickly and structured logging (EMF) to turn logs into metrics automatically.</p><p><strong>Use custom metrics wisely</strong><br>Publish only valuable custom metrics and avoid too many dimensions. Each unique metric adds cost, so aggregate data when possible and organize metrics under clear namespaces.</p><p><strong>Correlate metrics, logs, and traces</strong><br>Combine CloudWatch with X-Ray and ServiceLens to see how requests flow through your system. This helps you pinpoint performance issues faster across services.</p><p><strong>Automate alerts and recovery</strong><br>Connect alarms to Lambda or Systems Manager to fix common issues automatically. Send alerts through SNS or Slack so your team stays informed in real time.</p><p><strong>Centralize monitoring</strong><br>Use cross-account and cross-region dashboards to view all metrics and logs in one place. This simplifies operations and speeds up troubleshooting.</p><p><strong>Review and optimize regularly</strong><br>Check dashboards, alarms, and retention settings often. Remove outdated metrics, tune thresholds, and keep your monitoring setup clean and cost-effective.</p><p>CloudWatch works best when it is focused, automated, and continuously improved, turning data into insights that keep your applications reliable and efficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2nGPkXBJrsOuY1EWAidsAA.png" /><figcaption>Dashboard showing key metrics</figcaption></figure><h3>Demo: Monitoring the JobTrackr Application with Amazon CloudWatch</h3><p>To make JobTrackr more reliable and transparent, I integrated Amazon CloudWatch across its main AWS services including Lambda for backend processing, API Gateway for handling requests, DynamoDB for data storage, and S3 for frontend hosting. This setup provides complete visibility into system performance, user activity, and cost trends, helping detect and resolve issues quickly.</p><h4><strong>Step 1: Create dedicated Log Groups for debugging</strong></h4><p>I started by creating separate CloudWatch log groups for each core service to capture error, warning, and info-level logs for easier debugging and root cause analysis.<br>Each log group followed a clear and consistent naming pattern such as:</p><ul><li>/aws/lambda/&lt;function-name&gt;-&lt;environment&gt;</li><li>/aws/apigateway/&lt;api-name&gt;-&lt;environment&gt;</li><li>/aws/dynamodb/&lt;table-name&gt;</li><li>/aws/s3/&lt;bucket-name&gt;-hosting</li></ul><p><em>(Pattern: /aws/&lt;service-name&gt;/&lt;resource-name&gt;-&lt;environment&gt;)</em></p><p>This structure keeps logs organized and easy to navigate. Whether reviewing Lambda execution errors, tracing failed API calls, monitoring DynamoDB read/write activity, or checking frontend access logs from S3, all events are centralized in CloudWatch Logs for quick visibility and efficient debugging.</p><h4><strong>Step 2: Configure Metrics and Dashboards</strong></h4><p>Next, I created a CloudWatch dashboard to visualize key performance metrics across the JobTrackr system. The goal was to have a single real-time view of how different services behave under varying workloads.</p><p>The dashboard includes key metrics such as:</p><ul><li>Active users queried from DynamoDB</li><li>Total API requests processed through API Gateway</li><li>Lambda invocation count, average duration, and error rate</li><li>S3 request volume for the hosted frontend</li><li>Bedrock API usage and monthly cost trends</li></ul><p>By combining these metrics into one dashboard, CloudWatch provides a clear snapshot of system health, performance, and usage patterns, making it easy to identify anomalies or bottlenecks at a glance.</p><h4><strong>Step 3: Set Up Alarms for Performance Issues</strong></h4><p>To maintain uptime and ensure a smooth user experience, I configured CloudWatch alarms to automatically detect and alert on potential issues.</p><p>The alarms trigger notifications when:</p><ul><li>Lambda or API latency exceeds 30 seconds</li><li>Error requests rise above 5 per hour</li></ul><p>These alarms send instant notifications through Amazon SNS so any issue can be resolved before it affects users. Additional alarms can also be added, for example to monitor DynamoDB throttled requests, high API Gateway 5xx errors, or sudden drops in active users, providing deeper visibility and faster response to system anomalies.</p><h4><strong>Step 4: Apply Log Retention and Validation Practices</strong></h4><p>To keep logs manageable and cost-efficient, I configured log retention policies for each CloudWatch log group. All logs are automatically deleted after 14 days, preventing unnecessary storage costs while retaining enough data for analysis and debugging.</p><p>Once the setup was complete, I tested the monitoring workflow by triggering sample errors and latency spikes. When a failure occurs, I can now easily navigate to the respective log group, view detailed execution traces, and identify the root cause within seconds.</p><p>CloudWatch also lets me filter and search logs in real time using <strong>Logs Insights</strong>, helping quickly pinpoint issues such as failed Lambda invocations, API timeout errors, or DynamoDB throttling events. This ensures the entire JobTrackr system stays transparent, debuggable, and continuously monitored.</p><h4><strong>Step 5: Best Practices Followed</strong></h4><p>To make CloudWatch monitoring efficient, cost-effective, and easy to maintain, I followed several best practices during setup:</p><ul><li>Used clear and consistent naming conventions for log groups and metrics to keep monitoring organized.</li><li>Applied 14-day log retention policies to balance visibility with cost control.</li><li>Focused on key metrics and meaningful alarms to avoid noise and false alerts.</li><li>Created a single unified dashboard instead of multiple fragmented ones for better clarity.</li><li>Tested alarms and log queries regularly to ensure accuracy and reliability.</li></ul><p>With these best practices in place, JobTrackr’s CloudWatch monitoring is both robust and scalable. It now provides complete visibility into application health, enabling faster debugging, proactive alerting, and data-driven insights, ensuring the system remains reliable as it continues to grow.</p><h3><strong>Wrapping Up</strong></h3><p>In this part, we explored how <strong>Amazon CloudWatch</strong> helps monitor and maintain the health of the JobTrackr application. By integrating CloudWatch with Lambda, API Gateway, DynamoDB, and S3, we built a complete observability setup that tracks performance, logs critical events, and alerts the team when something needs attention.</p><p>Through dedicated log groups, real time dashboards, and meaningful alarms, JobTrackr now has full visibility into its backend, frontend, and APIs. This setup not only helps in detecting issues faster but also enables proactive monitoring, performance tuning, and cost optimization while keeping operations simple and efficient.</p><p>In the next and final part of this series, we will look back at the complete AWS journey behind JobTrackr, from building the backend and hosting the frontend to adding monitoring and automation. At this stage, we now have a fully functional application running entirely on AWS infrastructure, supported by a reliable and observable architecture. We will wrap it all up by highlighting key takeaways from each service and walking through a demo video that showcases the full end to end system in action.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way Series</strong></a><strong> </strong>→ This post is part of my ongoing series. You can start from the beginning here to follow along as we explore the broader serverless ecosystem.</p><p><a href="https://github.com/anpise/JobTrackr"><strong>GitHub</strong></a> → You can find the supporting code from this demo on my GitHub.</p><p>Have you tried Amazon CloudWatch before? What’s your favorite (or most challenging) use case? Share in the comments, I’d love to hear and compare experiences.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries #CloudFront #S3</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48431eb6035c" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-aws-the-practical-way-part-5-monitoring-and-observability-with-amazon-cloudwatch-48431eb6035c">Learning AWS the Practical Way — Part 5: Monitoring and Observability with Amazon CloudWatch</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning AWS the Practical Way — Part 4: Hosting App with Amazon S3 and CloudFront]]></title>
            <link>https://aws.plainenglish.io/learning-aws-the-practical-way-part-4-hosting-app-with-amazon-s3-and-cloudfront-475f822ee050?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/475f822ee050</guid>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[cloudfront]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Thu, 16 Oct 2025 12:02:33 GMT</pubDate>
            <atom:updated>2025-11-10T08:30:30.539Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learning AWS the Practical Way — Part 4: Hosting App with Amazon S3 and CloudFront</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*1weSyyXHvH_6Of2NDvOPNA.png" /></figure><p>I started a series called <a href="https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way</strong></a>. The idea is simple: I explore AWS services by building with them and sharing what I learn. Each post focuses on one service, dives into how it works, and shows how it connects into a real application.</p><p>In the previous parts, we built the secure backend of our <a href="https://github.com/anpise/JobTrackr"><strong>JobTrackr </strong></a>application. With <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6"><strong>AWS Lambda</strong></a>, we created the logic that powers our serverless compute, <a href="https://medium.com/@adityapise.0711/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c"><strong>DynamoDB</strong></a><strong> </strong>handled fast and reliable data storage, and <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-3-building-secure-apis-with-amazon-api-gateway-and-amazon-e6c7913f0425"><strong>API Gateway with Cognito</strong></a> ensured that only authenticated users could safely access our system. Together, they formed a backend that is scalable, efficient, and secure.</p><p>Now that the backend foundation is ready, it is time to focus on the frontend, the part users actually see and interact with. In this post, we explore <strong>Amazon S3</strong>, the cornerstone of AWS storage and one of the easiest ways to host and serve static content across the world.</p><p>S3 is where developers store files, images, and even entire web applications. It offers <strong>virtually unlimited storage</strong>, <strong>high durability</strong>, and <strong>global availability</strong>, making it a key building block for both small projects and enterprise-scale systems.</p><p>With that overview in mind, this post takes a closer look at <strong>Amazon S3</strong>, exploring how it stores, manages, and serves data at scale. If you prefer the hands-on part, you can skip ahead to the demo section.</p><p>In this article, we will cover<strong>:</strong></p><ul><li><strong>What is Amazon S3</strong></li><li><strong>The Evolution of S3</strong></li><li><strong>Who Uses S3 and Common Use Cases</strong></li><li><strong>Why developers choose (and avoid) S3</strong></li><li><strong>Best practices for building with S3</strong></li><li><strong>A demo of hosting JobTrackr frontend using Amazon S3 and CloudFront</strong></li></ul><h3>What is Amazon S3</h3><p>Amazon S3, or <strong>Simple Storage Service</strong>, is a cloud-based service that lets you store, access, and manage data from anywhere in the world over the internet. It removes the need to manage physical storage or servers, allowing you to focus on using your data instead of maintaining hardware.</p><p>In Amazon S3, all data is stored as <strong>objects </strong>inside <strong>buckets</strong>. An object can be any kind of file such as a photo, video, or document and comes with details called metadata. Each object is identified by a <strong>unique key,</strong> which acts like the file’s name and location within the bucket. This key makes it possible to access the exact object you need directly, even when a bucket contains millions of files. Buckets act as containers that hold these objects and define their region, access permissions, and settings.</p><p>Durability in Amazon S3 means your data is designed to last. When you upload a file, S3 automatically stores copies across multiple locations within a region, providing <strong>99.999999999 percent durability</strong>. Availability ensures your data is always accessible, with <strong>99.99 percent uptime</strong>, so files are ready whenever you need them. Together, these features make S3 a secure and reliable way to store important data.</p><p>Along with storage, S3 also supports <strong>static website hosting</strong>, allowing you to host HTML, CSS, and JavaScript files directly from a bucket. This lets you host websites or front-end apps without managing servers. When combined with <strong>Amazon CloudFront</strong>, S3 can deliver these websites globally with fast loading times and high reliability.</p><p>In simple terms, <strong>Amazon S3 </strong>combines scalability, security, and reliability to make data storage effortless. You can store anything from a single image to terabytes of data without worrying about capacity or maintenance. Whether it’s hosting a website, storing backups, or powering data analytics, S3 provides a strong and flexible foundation that grows with your needs while keeping your data safe and always within reach.</p><h3>The Evolution of S3</h3><p>Amazon S3 was launched on <strong>March 14, 2006 (Pi Day)</strong> as the first AWS infrastructure service. It introduced a simple design where developers could create buckets and use PUT and GET requests through a REST API to store and retrieve data. With pricing set at <strong>$0.15 per GB per month</strong>, it quickly became popular for its affordability, scalability, and ease of use. S3’s success validated the idea of cloud storage and marked the start of the modern cloud era.</p><p>From <strong>2010 to 2012</strong>, S3 expanded its core features to improve security and flexibility. AWS added <strong>bucket policies</strong>, <strong>object versioning</strong>, <strong>multi-part uploads</strong>, and <strong>server-side encryption</strong>. In <strong>2011</strong>, <strong>static website hosting</strong> allowed users to host simple websites directly from S3 buckets, while <strong>Amazon Glacier</strong> introduced affordable archival storage.</p><p>Between <strong>2014 and 2018</strong>, S3 grew into a more integrated part of the AWS ecosystem. It added <strong>cross-region replication</strong>, <strong>KMS-based encryption</strong>, and <strong>event notifications</strong> that connected with <strong>AWS Lambda</strong> for serverless workflows. The introduction of new <strong>storage classes</strong> like <strong>Standard-IA</strong> and <strong>Intelligent-Tiering</strong> helped users automatically optimize cost and performance.</p><p>From <strong>2019 to 2023</strong>, AWS focused on performance and consistency. <strong>Glacier Deep Archive</strong> lowered storage costs, and in <strong>2020</strong>, S3 achieved <strong>strong read-after-write consistency</strong>, ensuring immediate visibility of new or updated data. Features like <strong>S3 Storage Lens</strong> and <strong>Object Lambda</strong> improved monitoring and data access flexibility.</p><p>Since <strong>2024</strong>, S3 has evolved into smarter, AI-ready storage. The launch of <strong>S3 Metadata</strong> made it possible to automatically capture and query metadata for all objects using tools like <strong>Athena</strong> and <strong>Redshift</strong>. <strong>S3 Vectors</strong> (in preview) introduced vector storage for AI and machine learning workloads, while <strong>S3 Express One Zone</strong> improved performance and reduced costs for latency-sensitive use cases.</p><p>Nearly two decades after its launch, Amazon S3 has grown from a simple object storage service into the backbone of the modern cloud. Its core simplicity remains unchanged, yet its features now power analytics, AI, and enterprise workloads across the world, continuing to evolve while staying true to its original promise of durable, scalable, and reliable storage.</p><h3>Who Uses S3 and Common Use Cases</h3><p>Amazon S3 is used by a wide range of users, from individual developers and startups to large enterprises, research institutions, and government organizations. Its flexibility, scalability, and pay-as-you-go model make it a practical choice for storing, managing, and analyzing data in the cloud.</p><p><strong>Common Use Cases</strong><br><strong>Static website hosting:</strong> S3 can host static websites that include HTML, CSS, JavaScript, and images directly from a bucket. Developers upload their files, enable static website hosting, and S3 serves the content over HTTP or HTTPS. This setup is simple and low-cost, perfect for blogs, documentation, or personal projects. When combined with Amazon CloudFront, websites can be delivered globally with low latency and fast load times.</p><p><strong>Backup and archival storage:</strong> Many organizations use S3 for backups and archives because of its high durability and security. Data such as database exports, documents, and application files can be safely stored and retrieved when needed. With S3 Glacier and Glacier Deep Archive, older or rarely accessed data can be stored for years at a very low cost, making S3 ideal for disaster recovery and compliance.</p><p><strong>Data lakes and analytics:</strong> S3 is the foundation for many modern data lakes where organizations store massive amounts of raw data such as logs, sensor data, and media files. AWS services like Amazon Athena, Redshift Spectrum, and EMR can directly query or process this data without moving it. This separation of storage and compute enables scalable analytics, reporting, and machine learning workflows.</p><p><strong>Application content storage:</strong> Web and mobile applications use S3 to store user-generated content such as images, videos, and documents. It automatically scales with demand and integrates with CloudFront to deliver content quickly to users around the world. Many cloud-native applications, such as e-commerce and social platforms, rely on S3 to manage media and user data efficiently.</p><p><strong>Logging and IoT data:</strong> S3 is often used to collect and store large volumes of logs and sensor data from AWS services and IoT devices. Logs from CloudTrail, VPC Flow Logs, and AWS IoT can be stored in S3 for auditing, monitoring, and analytics. With lifecycle rules, old logs can be automatically moved to Glacier or deleted to control costs.</p><p>Some popular examples include Netflix using S3 to store and distribute media content globally, Airbnb managing user-uploaded images and listings, and NASA hosting its Earth observation datasets for public access. These examples show how S3 powers everything from global media delivery to scientific research, making it one of the most versatile and widely used storage services in the cloud.</p><p>Amazon S3 remains one of the most dependable and flexible storage services in the cloud. It is used across industries such as technology, finance, healthcare, and education, providing a simple, scalable, and secure way to store and access data anywhere.</p><h3><strong>Why developers choose (and avoid) S3</strong></h3><p>Amazon S3 is one of the most widely used cloud storage services because it combines scalability, reliability, and deep integration with the AWS ecosystem. However, it also comes with some trade-offs developers should know about.</p><h4>Strengths</h4><p><strong>Durability and reliability: </strong>S3 provides <strong>99.999999999% durability</strong> and <strong>99.99% availability</strong> by storing multiple copies of data across different locations. Even if hardware or an entire facility fails, your data remains safe and accessible.</p><p><strong>Scalability and performance: </strong>S3 can handle virtually unlimited storage and millions of requests per second without configuration. It’s optimized for high throughput and large file transfers, making it ideal for media storage, analytics, and backups.</p><p><strong>Security and access control: </strong>All data is encrypted at rest by default, with advanced options like <strong>SSE-KMS</strong> for key management. Fine-grained permissions via <strong>IAM</strong> and <strong>bucket policies</strong>, along with features like <strong>VPC endpoints</strong>, <strong>access logging</strong>, and <strong>Object Lock</strong>, help keep data secure and compliant.</p><p><strong>Integration with AWS ecosystem: </strong>S3 connects seamlessly with AWS services such as <strong>Lambda</strong>, <strong>CloudFront</strong>, <strong>Athena</strong>, and <strong>Glacier</strong>, enabling workflows from data ingestion to analytics. Its wide third-party support also makes it a common choice for backups and migrations.</p><p><strong>Cost flexibility: </strong>S3 offers multiple <strong>storage classes</strong> (Standard, IA, Glacier, Deep Archive) and <strong>Intelligent-Tiering</strong> to help balance performance and cost. With lifecycle rules and S3 Storage Lens, developers can automate data movement and monitor expenses easily.</p><h4>Weaknesses</h4><p><strong>Complex pricing: </strong>While affordable, S3 pricing can be confusing. Costs depend on storage, requests, data transfer, and retrieval, which can surprise new users without careful monitoring.</p><p><strong>Not for low-latency workloads: </strong>S3 works over HTTP and is optimized for large sequential access, not for frequent small reads or writes. It’s unsuitable for database-style or real-time applications.</p><p><strong>Complexity at scale: </strong>Managing large buckets, permissions, and lifecycle rules across multiple accounts can become challenging without automation or proper governance.</p><p><strong>Not a traditional file system: </strong>S3 doesn’t support folders, locks, or instant updates across regions. It follows an object-based model, so operations like renaming or moving files are actually copy-and-delete actions.</p><p>Overall, S3’s advantages durability, scalability, security, and ecosystem support far outweigh its drawbacks. When used correctly, it provides a reliable, cost-effective foundation for everything from web hosting and analytics to backups and machine learning workloads.</p><h4>Pricing Explained</h4><p>Amazon S3 follows a <strong>pay-as-you-go</strong> model with no upfront costs, meaning you only pay for what you actually use. However, its pricing is made up of several components, and understanding them helps you plan and avoid unexpected bills.</p><p><strong>AWS Free Tier for S3<br></strong>The <strong>AWS Free Tier</strong> offers new users free S3 usage for the first <strong>12 months</strong> after creating an account. It includes <strong>5 GB of Standard storage</strong>, <strong>20,000 GET requests</strong>, <strong>2,000 PUT/COPY/POST/LIST requests</strong>, and <strong>15 GB of data transfer out</strong> each month. This lets developers experiment with S3 for uploads, static website hosting, or integrations at no cost.</p><p><strong>1. Storage Costs</strong><br>S3 charges per gigabyte each month, depending on the storage class:</p><ul><li><strong>Standard:</strong> For frequent access (~$0.023/GB).</li><li><strong>Standard-IA:</strong> For infrequent access (~$0.0125/GB) with retrieval fees.</li><li><strong>One Zone-IA:</strong> Lower cost (~$0.01/GB) but stored in one Availability Zone.</li><li><strong>Intelligent-Tiering:</strong> Automatically adjusts storage tier based on access.</li><li><strong>Glacier &amp; Deep Archive:</strong> Cheapest options (~$0.00099/GB) for long-term storage.</li></ul><p>Choosing the right class helps save costs keep active data in Standard and archive old data with Glacier or lifecycle rules.</p><p><strong>2. Request and Retrieval Costs</strong><br>S3 charges small fees for API calls like PUT, GET, and LIST (about <strong>$0.005 per 1,000 requests</strong>). Retrieval fees apply for archival classes, while DELETE is free. These costs are minimal for most apps but can add up with frequent small requests.</p><p><strong>3. Data Transfer Costs</strong><br>Uploading to S3 is free, but transferring data <strong>out of AWS</strong> costs around <strong>$0.09 per GB</strong> for the first 100 GB per month. Using <strong>Amazon CloudFront</strong> can reduce egress costs, and transfers within the same region (like between EC2 and S3) are usually free.</p><p><strong>4. Optional Feature Costs</strong><br>Features like <strong>Inventory</strong>, <strong>Storage Lens</strong>, <strong>Batch Operations</strong>, <strong>S3 Select</strong>, and <strong>Object Lambda</strong> have small usage-based fees, mostly relevant at large scale.</p><p>In summary, S3’s pricing depends on <strong>storage, requests, transfer, and optional features</strong>. With lifecycle rules, cost monitoring, and the Free Tier, you can use S3 efficiently while keeping expenses low.</p><h3>Best Practices for Building with S3</h3><p>To get the best performance, security, and cost efficiency from Amazon S3, developers should follow a few key practices.</p><p><strong>Bucket naming</strong><br>Choose globally unique, DNS-compliant names using lowercase letters, numbers, and hyphens. Avoid uppercase letters, underscores, or sensitive information. Once created, a bucket name cannot be changed, so plan a consistent naming scheme that reflects your project or environment.</p><p><strong>Access control</strong><br>Keep buckets private by default. Use Block Public Access, IAM roles, and bucket policies instead of ACLs to manage permissions. Follow the principle of least privilege and use CloudFront with Origin Access Control if you need to serve public content securely.</p><p><strong>Encryption and security</strong><br>All new objects are encrypted by default with SSE-S3 (AES-256). For stricter compliance, use SSE-KMS to manage your own encryption keys and monitor key usage. Always use HTTPS, enable MFA Delete for critical data, and turn on CloudTrail for access logging.</p><p><strong>Versioning and lifecycle management</strong><br>Enable versioning to protect against accidental deletions or overwrites. Use lifecycle rules to automatically transition old versions to cheaper storage or delete them after a set period to control costs.</p><p><strong>Performance optimization</strong><br>Use multipart uploads for large files and parallel downloads for high throughput. For long-distance uploads, enable S3 Transfer Acceleration to speed up transfers through AWS edge locations.</p><p><strong>Monitoring and auditing</strong><br>Enable CloudTrail Data Events or S3 Access Logs to track who accesses your data. Use CloudWatch metrics and S3 Storage Lens to monitor bucket size, object counts, and unusual activity.</p><p><strong>Resilience and disaster recovery</strong><br>For critical workloads, enable Cross Region Replication (CRR) to automatically copy data to another region. Combine versioning, Object Lock, and CRR for maximum protection against data loss or tampering.</p><p>By following these practices and focusing on secure access, automation, and monitoring, you can ensure that your use of Amazon S3 remains efficient, reliable, and well protected.</p><h3>A Demo on Hosting JobTrackr Frontend with Amazon S3 and CloudFront</h3><p>After completing the backend setup, the next step was to host the JobTrackr React frontend in a scalable and secure way. I used <strong>Amazon S3</strong> for static website hosting and <strong>Amazon CloudFront</strong> for global delivery with HTTPS support.</p><p><strong>Step 1: Set Up S3 for Static Website Hosting</strong><br>I started by creating an Amazon S3 bucket to host the JobTrackr React build files. Within the bucket settings, I enabled static website hosting and set both the index and error documents to index.html so the React single-page application could handle client-side routing correctly.</p><p>After enabling static website hosting, S3 automatically generated a website endpoint that looked like this:<br><a href="http://xxxx.s3-website-us-east-1.amazonaws.com/">http://xxxx.s3-website-us-east-1.amazonaws.com</a></p><p>To make the site accessible, I allowed public read access for the static assets and attached a bucket policy granting read permissions to everyone. Once uploaded, the website was reachable through this S3 URL. However, since it only supported HTTP and not HTTPS, it wasn’t compatible with Amazon Cognito’s secure redirect requirements, which led to setting up <strong>Amazon CloudFront</strong> as the next step.</p><p><strong>Step 2: Configure CloudFront with S3 as the Origin</strong><br>To enable HTTPS and improve performance, I created a CloudFront distribution using the S3 bucket as the origin. This provided a secure, globally distributed URL for the website:<br><a href="https://xxxx.cloudfront.net/">https://xxxx.cloudfront.net</a></p><p>I also configured custom error responses so that 403 and 404 errors redirect to index.html with a 200 status, ensuring React Router paths like /dashboard and /callback load correctly. In addition, I enabled compression and caching headers in CloudFront to reduce load times and bandwidth usage. With CloudFront in front of S3, the site now supported HTTPS and delivered content quickly to users around the world, meeting Amazon Cognito’s secure redirect requirements.</p><p><strong>Step 3: Add Redirects, Build, and Deploy</strong><br>After setting up CloudFront, I updated the <strong>Amazon Cognito app client</strong> by adding the new CloudFront URLs to the list of callback and sign-out URLs. This ensured the authentication flow redirected users properly after login and logout.</p><p>I then updated the <strong>environment variables</strong> in the React app to reflect the new CloudFront and API Gateway endpoints, including the redirect URI for Cognito and the API base URL for backend communication. After that, I built the React project and uploaded the generated build files to the S3 bucket using the AWS Management Console. Finally, I refreshed the CloudFront cache to ensure users received the latest version of the site immediately.</p><p><strong>Step 4: Test the Deployed Site via CloudFront</strong><br>Once the deployment was complete, I opened the CloudFront URL to verify that everything worked as expected. The landing page loaded securely over HTTPS, and navigation across routes worked smoothly. I was able to sign in through Amazon Cognito and was redirected to the dashboard after login. The backend API requests returned valid responses, confirming that S3, CloudFront, API Gateway, and Cognito were fully integrated and functioning as intended.</p><p><strong>Step 5: Best Practices Followed</strong><br>To ensure the deployment was secure, scalable, and efficient, I followed several best practices throughout the setup:</p><ul><li>Enabled <strong>HTTPS</strong> through CloudFront to secure all user traffic.</li><li>Kept the <strong>S3 bucket private</strong>, granting public access only to required website assets.</li><li>Configured <strong>custom error pages</strong> in CloudFront to support client-side routing in React.</li><li>Performed <strong>cache invalidations</strong> after each deployment to deliver the latest version immediately.</li><li>Organized files and versions systematically to simplify maintenance and rollbacks.</li></ul><p>By combining Amazon S3 and CloudFront, the JobTrackr frontend achieved fast global delivery, strong security through HTTPS, and seamless integration with Cognito authentication. This setup ensures a professional-grade, serverless hosting solution that scales effortlessly with user demand while remaining cost-effective and easy to maintain.</p><h3>Wrapping Up</h3><p>In this part, we explored how Amazon S3 and CloudFront work together to deliver a secure, scalable, and globally distributed frontend for the JobTrackr application. S3 served as the reliable foundation for static hosting, while CloudFront provided HTTPS support, caching, and fast content delivery across regions.</p><p>By combining these services, the JobTrackr frontend now loads quickly, scales automatically with traffic, and integrates seamlessly with Cognito, API Gateway, and Lambda. The result is a complete serverless application that is secure, cost-efficient, and globally accessible without managing any servers.</p><p>In the next part of this series, we will continue building on this foundation by exploring <strong>Amazon CloudWatch</strong> and AWS monitoring tools to track performance, identify bottlenecks, and maintain visibility across the entire JobTrackr system.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way Series</strong></a><strong> </strong>→ This post is part of my ongoing series. You can start from the beginning here to follow along as we explore the broader serverless ecosystem.</p><p><a href="https://github.com/anpise/JobTrackr"><strong>GitHub</strong></a> → You can find the supporting code from this demo on my GitHub.</p><p>Have you tried Amazon S3 and Amazon CloudFront before? What’s your favorite (or most challenging) use case? Share in the comments, I’d love to hear and compare experiences.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries#CloudFront#S3</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=475f822ee050" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-aws-the-practical-way-part-4-hosting-app-with-amazon-s3-and-cloudfront-475f822ee050">Learning AWS the Practical Way — Part 4: Hosting App with Amazon S3 and CloudFront</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning AWS the Practical Way — Part 3: Building Secure APIs with Amazon API Gateway and Amazon…]]></title>
            <link>https://aws.plainenglish.io/learning-aws-the-practical-way-part-3-building-secure-apis-with-amazon-api-gateway-and-amazon-e6c7913f0425?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6c7913f0425</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Fri, 10 Oct 2025 12:02:13 GMT</pubDate>
            <atom:updated>2025-10-15T15:25:38.334Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learning AWS the Practical Way — Part 3: Building Secure APIs with Amazon API Gateway and Amazon Cognito</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*cDU4J6B8rmhIi1u5" /></figure><p>I started a series called <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way</strong></a>. The idea is simple. I explore AWS services by building with them and sharing what I learn. Each post focuses on one service, explains how it works, and shows how it connects to a real application.</p><p>In the previous parts, we built the foundation of our <a href="https://github.com/anpise/JobTrackr"><em>JobTrackr</em></a> application. With <a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6"><strong>AWS Lambda</strong></a>, we created the backend logic that runs our serverless compute, and with <a href="https://medium.com/@adityapise.0711/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c"><strong>Amazon DynamoDB</strong></a>, we added a fast, reliable database to store application data. Now that both the backend and database are ready, it’s time to take the next step and make our application secure and accessible to users.</p><p>Every backend needs a front door, a single entry point that manages requests, applies rules, and ensures only authorized users get in. In the AWS world, this front door is built using two key services: <strong>Amazon API Gateway</strong> and <strong>Amazon Cognito</strong>.</p><p>API Gateway acts like a traffic controller for your backend, handling routing, throttling, and monitoring, while integrating easily with services like Lambda and EC2. Cognito manages user authentication, helping users sign up, sign in, and securely access resources using JSON Web Tokens (JWTs) to verify their identity and permissions.</p><p>Now that we understand their roles at a high level, this post takes a deeper look at <strong>Amazon API Gateway</strong> and <strong>Amazon Cognito</strong>, and how they work together to secure your serverless backend. If you prefer the hands-on part, you can skip ahead to the demo section.</p><p><strong>In this article, we will cover:</strong></p><ul><li><strong>What is Amazon API Gateway</strong></li><li><strong>History of API Gateway</strong></li><li><strong>Common Use Cases for Amazon API Gateway</strong></li><li><strong>Strengths &amp; Weaknesses of API Gateway</strong></li><li><strong>What is Amazon Cognito</strong></li><li><strong>History of Cognito</strong></li><li><strong>Use Cases for Cognito</strong></li><li><strong>Strengths &amp; Weaknesses of Cognito</strong></li><li><strong>Best Practices (Combined Security Setup)</strong></li><li><strong>Hands-On Demo: Securing JobTrackr APIs with Amazon Cognito and API Gateway</strong></li></ul><h3>What is Amazon API Gateway</h3><p><strong>Amazon API Gateway</strong> is a fully managed service that makes it easy to build, publish, and manage APIs at any scale. It acts as the front door for your application, allowing clients to access backend data and functionality securely through defined API endpoints.</p><p>Developers can use API Gateway to create <strong>REST APIs</strong> for traditional request-response communication and <strong>WebSocket APIs</strong> for real-time, two-way interaction between clients and backend services. It automatically handles common API management tasks such as <strong>authorization</strong>, <strong>request routing</strong>, <strong>throttling</strong>, and <strong>monitoring</strong>, so you can focus on building your application rather than managing servers or infrastructure.</p><p>In short, <strong>Amazon API Gateway</strong> makes it simple to connect your backend to the outside world. Whether you are building a small project or a large-scale application, it provides one secure entry point to manage all your API traffic. It automatically scales to handle more requests as your application grows, and it takes care of important tasks like authentication and monitoring. This allows developers to focus on building great applications while AWS manages the heavy lifting behind the scenes.</p><h3>History of Amazon API Gateway</h3><p><strong>Amazon API Gateway</strong> was introduced in <strong>July 2015</strong> as a service to simplify how developers create, publish, and manage APIs in the cloud. At launch, it supported basic REST API capabilities with integration to <strong>AWS Lambda</strong>, enabling developers to build fully serverless applications without managing servers.</p><p>Over the next few years, API Gateway rapidly evolved with new features and improvements. In <strong>2016</strong>, AWS added support for <strong>Swagger or OpenAPI imports</strong>, <strong>custom domain names</strong>, <strong>SSL certificates</strong> through <strong>AWS Certificate Manager</strong>, and <strong>usage plans</strong> with API keys for monetization and rate limiting. It also introduced the ability to send <strong>binary data</strong>, making the service more flexible for different workloads.</p><p>In <strong>2017</strong>, API Gateway gained <strong>edge optimized</strong> and <strong>regional endpoints</strong>, allowing developers to choose between global and region specific deployments. It also added <strong>integration with AWS X-Ray</strong> for request tracing and <strong>private APIs</strong> accessible through <strong>VPC endpoints</strong>, improving both performance and security.</p><p>A major milestone arrived in <strong>December 2018</strong> with the introduction of <strong>WebSocket APIs</strong>, enabling developers to build real time, two way communication applications such as chat systems, gaming platforms, and live dashboards, all managed through the same API Gateway infrastructure.</p><p>In <strong>late 2019</strong>, AWS announced a new variant called <strong>HTTP APIs</strong>, released generally in <strong>March 2020</strong>, as a faster, simpler, and lower cost alternative to REST APIs. HTTP APIs introduced <strong>JWT authorizers</strong> for token based authentication, easier configuration, and significantly lower latency, while REST APIs continued to provide more advanced customization options.</p><p>Over time, <strong>Amazon API Gateway</strong> has continued to mature with better performance, extended timeouts, and deeper integration with other AWS services. Today, it remains a cornerstone of <strong>serverless</strong> and <strong>microservice architectures</strong>, offering REST, HTTP, and WebSocket APIs that make it easier to build scalable, secure, and event driven applications on AWS.</p><h3>Common Use Cases for Amazon API Gateway</h3><p><strong>Amazon API Gateway</strong> is used by developers and organizations to create secure and scalable APIs without managing servers. It allows teams to connect clients and backend services efficiently while supporting both REST and WebSocket communication models. Its flexibility makes it a core component of modern web, mobile, and real time applications built on AWS.</p><h4>Common Use Cases</h4><ul><li><strong>Serverless Web APIs</strong>: Connect web or mobile frontends to AWS Lambda functions that process requests and DynamoDB for storing data. This setup powers dynamic, serverless applications that scale automatically based on demand.</li><li><strong>Microservices Gateway</strong>: Serve as a single entry point for multiple microservices running on Lambda, ECS, or Fargate, simplifying routing, authentication, and version management across distributed systems.</li><li><strong>Versioning and Canary Deployments</strong>: Manage multiple API stages such as <em>dev</em>, <em>staging</em>, and <em>prod</em> within API Gateway. Use canary deployments to gradually roll out new API versions to a small percentage of users, monitor performance through CloudWatch, and safely promote changes without downtime.</li><li><strong>Real Time Applications</strong>: Use WebSocket APIs to build chat systems, dashboards, and trading platforms where clients receive live updates instantly.</li><li><strong>Secure Public APIs</strong>: Expose APIs to external users or partners safely using Cognito authentication, API keys, and usage plans to manage access and rate limits.</li><li><strong>Event Driven Workflows</strong>: Handle webhooks and external triggers from services like GitHub, Stripe, or Slack, invoking Lambda functions to automate workflows and data processing.</li></ul><p>Because of its reliability and deep integration across AWS services, <strong>Amazon API Gateway</strong> is trusted by companies such as <strong>DoorDash</strong>, <strong>Miovision</strong>, and <strong>FOX</strong>. DoorDash uses API Gateway and <strong>AWS Lambda</strong> to build event-driven workflows that process millions of customer interactions and orders daily. Miovision relies on it to expose real-time traffic and sensor data from cities worldwide, while FOX uses it as a unified API layer for delivering streaming content and digital experiences through applications like FOX NOW.</p><p>In short, <strong>Amazon API Gateway</strong> makes it easy to design, deploy, and manage APIs that can handle any scale of traffic. Its ability to integrate seamlessly with other AWS services and support multiple API patterns makes it a vital tool for building modern, cloud native applications.</p><h3>Strengths and Weaknesses of Amazon API Gateway</h3><p><strong>Amazon API Gateway</strong> is one of the most feature-rich and widely used services in AWS for building and managing APIs. It removes the complexity of managing infrastructure while providing deep integrations across the AWS ecosystem.</p><h4><strong>Strengths</strong></h4><ul><li><strong>Fully Managed and Scalable:</strong> API Gateway automatically handles scaling from a few requests to hundreds of thousands of concurrent API calls without any manual setup. You pay only for what you use, making it ideal for unpredictable or spiky workloads.</li><li><strong>Deep AWS Integration:</strong> API Gateway works seamlessly with AWS Lambda, Step Functions, DynamoDB, SNS, Cognito, IAM, and CloudWatch. You can trigger a Lambda function, insert an item into DynamoDB, or publish a message to SNS directly through API Gateway, often without writing additional backend code.</li><li><strong>Comprehensive API Management:</strong> It provides built-in tools for authentication, rate limiting, caching, and versioning. You can secure APIs using Cognito, IAM policies, or custom authorizers, and manage multiple environments such as development, staging, and production from one place.</li><li><strong>Supports Multiple API Styles:</strong> API Gateway supports both REST and WebSocket APIs, allowing you to build traditional request-response applications or real-time systems like chats, dashboards, and live data streams, all within a single service.</li><li><strong>Global Reach and Custom Domains:</strong> Edge-optimized endpoints use the Amazon CloudFront network to deliver content quickly to users around the world. You can also connect your own domain name and add SSL certificates so your APIs look professional, stay secure, and perform reliably everywhere.</li></ul><h4>Weaknesses</h4><ul><li><strong>Costs at High Scale</strong>: API Gateway charges per request, which can become expensive if your application handles millions or billions of API calls. While the newer <strong>HTTP API</strong> tier is cheaper, costs can still add up compared to self-managed servers for constant, heavy traffic.</li><li><strong>Cold Starts and Latency</strong>: When API Gateway triggers a Lambda function, there can be a short delay if the function hasn’t been used recently. This is called a <strong><em>cold start</em></strong>. On top of that, API Gateway adds a small amount of extra time for routing requests, which may matter for apps that need very low latency.</li><li><strong>Configuration Complexity:</strong> Amazon API Gateway includes many features such as stages, integrations, mappings, and permissions, which can feel overwhelming for beginners. Misconfigurations or missing permissions often require checking CloudWatch logs to identify and fix the issue, which can take some practice.</li><li><strong>Payload Size Limit</strong>: API Gateway supports up to 10 MB per request or response, so it’s not suited for transferring large files. A common pattern is to generate <strong>pre-signed S3 URLs</strong> for uploads and downloads instead.</li><li><strong>Tied to AWS Ecosystem:</strong> Since API Gateway is built to work closely with other AWS services, moving your setup to another cloud platform later can require major changes. Some features, like custom authorizers or mapping templates, are unique to AWS and don’t transfer easily.</li></ul><h4>Pricing Explained</h4><p>Amazon API Gateway uses a <strong>pay as you go</strong> model, where you are charged based on the number of API calls, the type of API you use, and any optional features such as data transfer, caching, or custom domains. There are no upfront costs or minimum fees, and you only pay for what you use.</p><p><strong>Free Tier<br></strong>For the first 12 months, new AWS customers receive:</p><ul><li>1 million REST API calls per month</li><li>1 million HTTP API calls per month</li><li>1 million messages and 750,000 connection minutes for WebSocket APIs per month</li></ul><p><strong>1. HTTP APIs (Most Cost Efficient)<br></strong>HTTP APIs are optimized for performance and lower cost, making them ideal for high traffic workloads and simple integrations.</p><ul><li><strong>Cost:</strong> $1.00 per million requests</li><li><strong>Caching:</strong> Not supported</li><li><strong>Use Case:</strong> Lightweight applications or microservices that do not require advanced API management features</li></ul><p><strong>2. REST APIs (Feature Rich, Higher Cost)<br></strong>REST APIs include more advanced features such as request validation, usage plans, transformations, and caching.</p><ul><li><strong>Cost:</strong> $3.50 per million requests</li><li><strong>Caching (optional):</strong> Starts at $0.02 per GB hour, depending on cache size</li><li><strong>Use Case:</strong> Applications that need fine grained control, versioning, or API key management</li></ul><p><strong>3. WebSocket APIs (Real Time Communication)<br></strong>WebSocket APIs allow two way, persistent connections between clients and servers for real time communication.</p><ul><li><strong>Cost:</strong> $1.00 per million messages sent and received</li><li><strong>Connection Charges:</strong> $0.25 per million connection minutes</li><li><strong>Use Case:</strong> Real time applications such as chat, dashboards, or streaming data</li></ul><p><strong>Additional Costs<br></strong>In addition to API call charges, you may also pay for:</p><ul><li>Data transfer to the internet, following standard AWS rates</li><li>Private API connections using AWS PrivateLink or VPC endpoints</li><li>Custom domain names and SSL certificates through AWS Certificate Manager</li></ul><h3>What is Amazon Cognito</h3><p><strong>Amazon Cognito</strong> is a fully managed service that adds <strong>user authentication, authorization, and access control</strong> to your web and mobile applications. It lets you easily include secure sign-up, sign-in, and session management features without building them from scratch.</p><p>In simple terms, Cognito acts as your application’s <strong>user identity system</strong>, allowing people to log in using a username and password or through third-party providers such as <strong>Google, Apple, Facebook, and Amazon</strong>. It issues secure tokens that your app can use to verify who the user is and what they are allowed to do.</p><p>Cognito has two main components that can work independently or together:</p><p><strong>1. User Pools</strong><br>A <strong>User Pool</strong> is a user directory that manages sign-up and sign-in for your application. It can handle everything from password policies and email verification to multi-factor authentication (MFA). After a successful login, the user pool generates <strong>JSON Web Tokens (JWTs)</strong> that your backend or API Gateway can use to verify user identity.</p><p><strong>2. Identity Pools</strong><br>An <strong>Identity Pool</strong> allows users to access other AWS services such as <strong>S3</strong> or <strong>DynamoDB</strong> using temporary, limited credentials. For example, a logged-in user can upload files to an S3 bucket or read from a DynamoDB table without needing long-term AWS keys.</p><p>In short, <strong>Amazon Cognito</strong> simplifies adding secure user authentication to your applications while managing identities at scale. It handles complex security tasks such as token generation, user sessions, and access control, so you can focus on building your application’s core functionality.</p><h3>History of Amazon Cognito</h3><p>Amazon Cognito was launched in <strong>July 2014</strong> as a service designed mainly for mobile developers. Its first version focused on <strong>federated identities</strong> and <strong>data synchronization</strong>, allowing apps to create unique user IDs that could be linked to login providers such as Amazon, Google, or Facebook, or even used for guest access. It also introduced a sync feature that let apps store user preferences and progress locally and then synchronize them across devices. This made it easier for developers to build consistent user experiences across multiple platforms.</p><p>As applications began needing stronger authentication and user management, AWS expanded Cognito’s capabilities. In <strong>2015</strong>, support was added for new authentication providers and the ability to trigger <strong>AWS Lambda functions</strong> during user events, enabling developers to run custom logic such as sending welcome emails or validating data when a user signs up.</p><p>A major milestone came in <strong>April 2016</strong> with the introduction of <strong>Cognito User Pools</strong>. This turned Cognito from a federation tool into a full authentication and user directory service. With User Pools, developers could build secure sign-up and sign-in systems directly in AWS, complete with password management, multi-factor authentication (MFA), and account recovery. This removed the need to depend entirely on third-party identity providers or custom-built authentication systems.</p><p>The earlier feature, <strong>Identity Pools</strong>, continued to handle authorization by granting authenticated users temporary AWS credentials to access services like <strong>Amazon S3</strong> and <strong>DynamoDB</strong>. Together, User Pools and Identity Pools became the foundation of Cognito’s identity system: one managing user authentication, the other managing access to AWS resources.</p><p>Between <strong>2017 and 2019</strong>, Cognito grew rapidly. It added support for <strong>SAML 2.0</strong> and <strong>OpenID Connect (OIDC)</strong> for enterprise authentication, launched a <strong>Hosted UI</strong> for easy sign-up and sign-in, and introduced <strong>adaptive authentication</strong>, a feature that detects unusual login activity based on device or location. These updates made Cognito a strong alternative to popular platforms like Auth0 and Firebase Authentication.</p><p>In <strong>2020</strong>, AWS improved Cognito’s integration with other serverless services like <strong>API Gateway</strong> and <strong>IAM</strong>, while expanding its availability and compliance certifications such as <strong>SOC</strong> and <strong>HIPAA</strong>, making it suitable for enterprise and regulated use cases.</p><p>The most significant updates arrived in <strong>2023 and 2024</strong>, including a redesigned console, a new <strong>Managed Login</strong> experience with customization options, and support for <strong>passwordless authentication</strong> using magic links, one-time passwords (OTPs), and WebAuthn passkeys. AWS also introduced flexible pricing tiers to help developers scale more efficiently.</p><p>Today, <strong>Amazon Cognito</strong> is a core part of the AWS serverless ecosystem. What started as a simple sync tool for mobile apps has evolved into a complete <strong>Customer Identity and Access Management (CIAM)</strong> service that powers millions of secure logins every day, working seamlessly with <strong>API Gateway</strong>, <strong>Lambda</strong>, and other AWS services.</p><h3>Common Use Cases for Amazon Cognito</h3><p>Amazon Cognito is used by developers and organizations to add secure authentication and access control to web, mobile, and serverless applications. It eliminates the need to build complex login systems from scratch while providing a scalable way to manage millions of users. Its flexibility makes it a key part of many modern applications that need reliable user identity management in the AWS ecosystem.</p><p><strong>Common use cases include:</strong></p><ul><li><strong>Web and Mobile App Authentication</strong><br>Cognito allows users to sign up and log in securely using email, phone number, or third-party providers like Google, Apple, or Facebook. Applications such as e-commerce stores, social platforms, and content portals commonly use Cognito to manage customer accounts and sessions.</li><li><strong>Serverless Backend Authorization</strong><br>When used with <strong>Amazon API Gateway</strong> and <strong>AWS Lambda</strong>, Cognito can control who accesses backend APIs. Users log in through Cognito, receive tokens, and API Gateway verifies those tokens before allowing access. This is a popular setup for serverless web apps, where authentication and authorization happen without running dedicated servers.</li><li><strong>Enterprise Login with Federated Identities</strong><br>Cognito integrates with enterprise identity providers using <strong>SAML 2.0</strong> and <strong>OpenID Connect (OIDC)</strong>. This allows corporate users to log in with their existing credentials from systems like Microsoft Azure AD or Okta, enabling single sign-on (SSO) across internal and external applications.</li><li><strong>Access to AWS Resources</strong><br>Using <strong>Identity Pools</strong>, Cognito grants users temporary, limited credentials to directly access AWS services such as <strong>S3</strong> and <strong>DynamoDB</strong>. For example, a user could upload profile pictures to S3 or fetch data from DynamoDB without exposing permanent AWS credentials.</li><li><strong>Multi-Factor and Passwordless Authentication</strong><br>Cognito supports <strong>multi-factor authentication (MFA)</strong> for added security and now offers <strong>passwordless authentication</strong> using magic links, OTPs, and WebAuthn passkeys. This makes it suitable for applications where user trust and compliance are critical.</li><li><strong>Secure SaaS and Multi-Tenant Applications</strong><br>Cognito’s ability to manage multiple user groups and roles allows SaaS providers to build applications that serve different organizations from a single environment while maintaining data isolation and access control.</li></ul><p>Many well-known organizations use Cognito as part of their AWS infrastructure. <strong>DoorDash</strong> uses Cognito to manage identity for its delivery and partner ecosystem. <strong>Thomson Reuters</strong> secures internal and client-facing applications using Cognito’s federated identity support. <strong>Edmodo</strong>, an education platform, relies on Cognito for user authentication across millions of students and teachers.</p><p>In short, Amazon Cognito makes it easy to manage user identities while keeping applications secure and scalable. Whether it’s a mobile app, SaaS product, or enterprise platform, Cognito provides a flexible and reliable foundation for authentication and access management on AWS.</p><h3>Strengths and Weaknesses of Amazon Cognito</h3><p>Amazon Cognito is a core AWS service for managing user authentication and access control. It makes it easy to add secure login and identity management to applications while integrating seamlessly with other AWS services.</p><h4>Strengths</h4><ul><li><strong>Fully Managed and Scalable: </strong>Cognito automatically handles scaling and security for millions of users without any server management. Whether you have a small app or a global platform, it adjusts to demand and maintains high availability.</li><li><strong>Deep AWS Integration: </strong>It works smoothly with services like <strong>API Gateway</strong>, <strong>Lambda</strong>, <strong>IAM</strong>, <strong>S3</strong>, and <strong>DynamoDB</strong>, allowing developers to secure APIs, run custom authentication workflows, and grant access to AWS resources directly from Cognito.</li><li><strong>Multiple Authentication Options: </strong>Cognito supports various login methods including username and password, social providers like Google, Apple, and Facebook, and enterprise options such as SAML and OpenID Connect. It also supports <strong>multi-factor authentication (MFA)</strong> and <strong>passwordless sign-ins</strong> for better security.</li><li><strong>Comprehensive User Management: </strong>With <strong>User Pools</strong>, developers can manage profiles, password policies, account recovery, and custom user attributes from the AWS console or SDKs. Built-in verification and user groups make access control straightforward.</li><li><strong>Security and Compliance: </strong>Cognito meets major compliance standards like <strong>SOC</strong>, <strong>ISO</strong>, and <strong>HIPAA eligibility</strong>, and uses secure token-based authentication (JWTs) to protect user sessions and data.</li><li><strong>Customizable Hosted UI: </strong>The <strong>Hosted UI</strong> and <strong>Managed Login</strong> features allow developers to set up sign-in and sign-up pages quickly with options for branding, logos, and color customization, reducing time spent on front-end development.</li></ul><h4>Weaknesses</h4><ul><li><strong>Complex Setup for Beginners: </strong>Cognito includes several moving parts such as User Pools, Identity Pools, and authentication flows, which can feel overwhelming at first. Configuring permissions and integrations often requires a good understanding of AWS IAM and security concepts.</li><li><strong>Limited UI Customization: </strong>While the Hosted UI and Managed Login make setup easy, customization options are limited. Developers who want complete design control often need to build their own login pages using the Cognito SDKs or APIs.</li><li><strong>Debugging and Error Visibility: </strong>Error messages during sign-in or token validation can be vague, making troubleshooting difficult. In most cases, developers must check CloudWatch logs to identify issues, which can slow down debugging and testing.</li><li><strong>Feature Gaps Compared to Dedicated Platforms: </strong>Cognito covers core authentication and authorization needs but lacks some advanced features offered by dedicated identity providers like Auth0 or Okta, such as detailed analytics, user segmentation, or built-in customer engagement tools.</li><li><strong>Pricing Complexity: </strong>Although Cognito’s pricing is cost-effective for small and medium projects, it can be tricky to estimate costs when combining User Pools, Identity Pools, and SMS-based MFA. Tracking usage across multiple environments may require extra monitoring.</li></ul><h4>Pricing Explained (Amazon Cognito)</h4><p>Amazon Cognito uses a simple <strong>pay-as-you-go</strong> pricing model based on <strong>Monthly Active Users (MAUs)</strong>. A Monthly Active User is anyone who signs in, refreshes tokens, or performs an identity-related action such as resetting a password during the month. Users who do not log in or perform any actions in that month are considered inactive and are not billed.</p><p>Cognito has two main parts: <strong>User Pools</strong> for sign-up and sign-in, and <strong>Identity Pools</strong> for giving users temporary access to AWS services like S3 or DynamoDB.</p><p>For <strong>User Pools</strong>, Cognito offers three pricing tiers with a generous free limit:</p><ul><li>The <strong>first 10,000 MAUs per month</strong> are free for direct or social logins.</li><li>After that, costs vary depending on the tier:</li><li><strong>Lite Tier:</strong> about <strong>$0.0055 per MAU</strong> for basic authentication.</li><li><strong>Essentials Tier:</strong> about <strong>$0.015 per MAU</strong> for stronger security features.</li><li><strong>Plus Tier:</strong> about <strong>$0.020 per MAU</strong> for advanced features like passwordless authentication and threat detection.</li></ul><p>Federated logins (via SAML or OIDC) also have a small free tier of <strong>50 MAUs per month</strong> before billing begins.</p><p>For <strong>Identity Pools</strong>, pricing is separate because it involves AWS resource access. The first <strong>50 users per month</strong> who receive temporary AWS credentials are free, and after that, each active user costs about <strong>$0.015 per month</strong>. Guest or unauthenticated users are billed at the same rate once the free limit is exceeded.</p><p>In addition to these base costs, you may pay for:</p><ul><li><strong>SMS and Email Verification:</strong> Messages sent for MFA or user confirmation through Amazon SNS.</li><li><strong>Advanced Security Features:</strong> Enabling adaptive authentication or compromised credential detection.</li><li><strong>API Usage:</strong> If your app exceeds default request limits or uses advanced options.</li></ul><p>Overall, Cognito’s pricing is designed to scale with your application. Small apps can stay within the free tier, while growing applications only pay for users who are actually active.</p><h3>Best Practices for Amazon API Gateway and Amazon Cognito</h3><p>When building secure and scalable APIs on AWS, Amazon API Gateway and Amazon Cognito work best when used together. API Gateway manages the flow of API traffic, while Cognito controls who can access it. Following a few best practices helps your backend remain fast, secure, and cost-efficient.</p><p><strong>Design with Security in Mind</strong><br>Always use HTTPS to keep data safe and make sure only logged-in users can access your APIs using IAM or Cognito authorizers. Give each user or role only the access they need. Turn on MFA and email or phone verification in Cognito for extra protection. Keep tokens short-lived and watch for unusual activity to keep your app secure.</p><p><strong>Use Proper Authentication and Authorization Flow<br></strong>Let Cognito handle sign up and sign in through its User Pools, and use Identity Pools to grant users temporary AWS credentials for accessing services such as S3 or DynamoDB. API Gateway can use these Cognito tokens to verify users before requests reach your backend, ensuring that every API call comes from an authenticated source.</p><p><strong>Enable Monitoring and Logging<br></strong>Turn on CloudWatch Logs and CloudTrail for both API Gateway and Cognito. Logs help you track API performance, failed logins, and unusual activity. Set up alarms for spikes in errors or latency and monitor usage metrics such as API request count, login failures, and MFA prompts. This visibility helps detect problems early and improve reliability.</p><p><strong>Optimize for Performance and Cost</strong><br>Use HTTP APIs for faster, cheaper setups and REST APIs for advanced features. Enable caching in API Gateway to reduce backend load. In Cognito, manage refresh tokens well to avoid extra sign-ins and prefer email or authenticator apps over SMS to save costs.</p><p><strong>Manage Stages and Versioning Cleanly</strong><br>Use separate stages in API Gateway for development, testing, and production. Try canary deployments to safely test updates. In Cognito, keep different user pools for testing and production to prevent mixing real and test users.</p><p><strong>Leverage Lambda Triggers for Custom Workflows</strong><br>Cognito’s Lambda triggers let you add custom logic to user events such as sign up or login. For example, you can send a personalized welcome email or block disposable email domains. Keep these triggers lightweight for faster performance and monitor them with CloudWatch.</p><p>Amazon API Gateway and Amazon Cognito together form a powerful security and access control layer for cloud applications. By following these practices such as using built-in integrations, enabling monitoring, and automating deployments, you can keep your system secure, reliable, and ready to scale.</p><h3>A Demo on securing JobTrackr APIs with Amazon Cognito and API Gateway</h3><p>Now that the backend logic and DynamoDB integration are in place, the next step was to make the APIs secure and accessible only to authenticated users. In this demo, I used <strong>Amazon Cognito</strong> to handle user authentication and <strong>API Gateway</strong> as the protected entry point that verifies user tokens before allowing access to AWS Lambda.</p><h4>Step 1: Set Up Amazon Cognito User Pool</h4><p>I started by creating a <strong>User Pool</strong> in Amazon Cognito to handle user authentication for <strong>JobTrackr</strong>. From the setup page, I selected <strong>“User Pool”</strong> as the application type, named it <strong>JobTrackrUsers</strong>, and chose <strong>Single Page Application (SPA)</strong> as the app type.</p><p>I enabled <strong>email-based sign-up and verification</strong>, allowed <strong>self-registration</strong> so users can sign up on their own, and disabled <strong>MFA</strong> to keep the demo simple. I skipped adding a return URL for now since the frontend isn’t ready yet.</p><p>Cognito automatically creates an <strong>app client</strong> during this setup, which handles the configuration needed for the <strong>Hosted UI</strong> and token generation. It also generated a <strong>Hosted UI</strong> with built-in sign-up and sign-in pages that can be customized later with branding elements like your app’s logo and colors.</p><p>From the console, you can also connect <strong>external identity providers</strong> such as Google, Apple, Facebook, or Amazon to let users sign in using their existing accounts (though I didn’t configure these for this demo).</p><p>After creation, I saved three important values needed for later:</p><ul><li><strong>User Pool ID</strong> (format: us-east-1_xxxxxxxxx)</li><li><strong>App Client ID</strong></li><li><strong>AWS Region</strong></li></ul><p>This basic setup lets users register, verify their email, and log in securely, with Cognito issuing <strong>JWT tokens</strong> (ID token, access token, and refresh token) that are used for API authentication with API Gateway.</p><h4>Step 2: Set Up Amazon API Gateway</h4><p>Next, I created a REST API in <strong>Amazon API Gateway</strong> to serve as the secure entry point for all backend operations in JobTrackr. From the console, I chose <strong>Create API → REST API → Build</strong>, named it <strong>JobTrackr-API</strong>, selected <strong>Regional</strong> as the endpoint type, and enforced <strong>HTTPS only</strong> for all requests.</p><p>Amazon API Gateway also provides an option to <strong>import an OpenAPI specification</strong>, which lets you define all routes, methods, and integrations in a single YAML or JSON file. I tried both methods and found that, for a beginner setup like this, creating resources manually through the console was simpler and easier to follow.</p><p>I created a resource hierarchy with three levels:</p><ul><li>/api (parent resource)</li><li>/api/jobs (child resource with <strong>GET</strong> method)</li><li>/api/jobs/ingest (child resource with <strong>POST</strong> method)</li></ul><p>The <strong>GET</strong> method retrieves a user’s saved job listings with pagination support (user_id, limit, and last_key parameters), while the <strong>POST</strong> method accepts a job URL, scrapes it, analyzes it with AI, and stores the results in DynamoDB.</p><p>Both methods were integrated with the same <strong>AWS Lambda function</strong> using <strong>Lambda proxy integration</strong>, which passes the entire HTTP request (headers, body, and query parameters) directly to Lambda for processing. The Lambda function uses simple internal routing logic to determine which handler to invoke based on the HTTP method and path.</p><p>After that, I enabled <strong>CORS</strong> for all resources (/api, /api/jobs, and /api/jobs/ingest) so the frontend could make browser requests without cross-origin issues.</p><p>Finally, I deployed the API to a <strong>dev stage</strong>, which generated a public Invoke URL in the format:<br> <a href="https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev">https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev</a></p><p>At this stage, the API Gateway setup was complete, fully integrated with Cognito for authentication, and ready for testing.</p><h4>Step 3: Connect Amazon Cognito with API Gateway</h4><p>To secure the API, I created a Cognito Authorizer named <strong>CognitoAuthorizer</strong> and linked it to the <strong>JobTrackr-UserPool</strong>. This authorizer verifies the JSON Web Tokens (JWTs) that users receive after signing in through Cognito.</p><p>In the API Gateway console, I opened the <strong>JobTrackr-API</strong>, navigated to the <strong>Authorizers</strong> section, and selected <strong>Create New Authorizer</strong>. I chose <strong>Cognito</strong> as the type, selected the <strong>JobTrackr-UserPool</strong> from the dropdown, and set the token source to <strong>Authorization</strong>, meaning API Gateway looks for the JWT token in the Authorization header of incoming requests.</p><p>The authorizer checks that the token is properly signed by Cognito, not expired, and belongs to a valid user in the pool before allowing the request to proceed.</p><p>After creating the authorizer, I attached it to both API methods by selecting each method (<strong>GET /api/jobs</strong> and <strong>POST /api/jobs/ingest</strong>), opening <strong>Method Request</strong>, and changing the <strong>Authorization</strong> setting from <strong>NONE</strong> to <strong>CognitoAuthorizer</strong>.</p><p>With this setup, API Gateway automatically blocks any request without a valid Cognito token before it reaches the Lambda function, ensuring that only authenticated users can access the API.</p><h3>Step 4: Test the API Gateway + Cognito + Lambda Integration</h3><p>After setting up Amazon Cognito for authentication and API Gateway as the secure entry point, I tested the full flow to make sure everything worked together smoothly.</p><p>I created a test user in the Cognito console and used the <strong>AWS CLI</strong> to log in and retrieve the <strong>JWT tokens (ID, access, and refresh tokens)</strong>. These tokens confirm the user’s identity and are required for making authorized API calls.</p><p>Using the <strong>ID token</strong>, I tested all three API routes through Postman:</p><ul><li><strong>POST /api/jobs/ingest</strong> — submitted a sample job URL and confirmed the processed job details were stored in DynamoDB.</li><li><strong>GET /api/jobs</strong> — fetched the stored job listings with pagination support.</li></ul><p>Each request with a valid token succeeded, and I could see new job records appearing in the <strong>UsersJobs</strong> table in DynamoDB. Requests without a token were blocked by API Gateway with a <strong>401 Unauthorized</strong> error before reaching the Lambda function.</p><p>This confirmed that Amazon Cognito, API Gateway, Lambda, and DynamoDB were all properly connected, forming a secure and reliable serverless workflow for JobTrackr.</p><h3>Step 5: Best Practices Followed</h3><p>While building this integration, I focused on a few key best practices to keep the architecture secure, efficient, and scalable:</p><ul><li>Secured all API routes with Cognito authorizers so only authenticated users can access the backend.</li><li>Applied least-privilege IAM roles for Lambda and API Gateway, restricting access only to the DynamoDB table and required AWS services.</li><li>Enabled CORS carefully to allow browser requests only from trusted domains.</li><li>Validated input data in Lambda before writing to DynamoDB to maintain data consistency and prevent bad entries.</li></ul><p>These practices kept the JobTrackr backend secure, reliable, and well-optimized. With Cognito managing authentication, API Gateway routing traffic, and Lambda handling logic, the system now runs as a fully serverless, production-ready setup.</p><h3><strong>Wrapping Up</strong></h3><p>In this part, we completed the secure backbone of our serverless backend. AWS Lambda handles the logic, DynamoDB stores the data, and with API Gateway and Cognito in place, our JobTrackr application can now process and protect user requests safely at scale.</p><p>By combining these services, we have built a system that is fast, secure, and able to grow without extra infrastructure management. API Gateway controls how requests flow, while Cognito ensures that only verified users have access, creating a smooth and secure experience for everyone.</p><p>In the next part of this series, we will focus on the frontend by using <strong>Amazon S3 and CloudFront</strong> to host and deliver JobTrackr’s web interface globally, bringing the full serverless architecture together from end to end.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way Series</strong></a><strong> </strong>→ This post is part of my ongoing series. You can start from the beginning here to follow along as we explore the broader serverless ecosystem.</p><p><a href="https://github.com/anpise/JobTrackr"><strong>GitHub</strong></a> → You can find the supporting code from this demo on my GitHub.</p><p>Have you tried Amazon Gateway and Amazon Cognito before? What’s your favorite (or most challenging) use case? Share in the comments, I’d love to hear and compare experiences.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6c7913f0425" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-aws-the-practical-way-part-3-building-secure-apis-with-amazon-api-gateway-and-amazon-e6c7913f0425">Learning AWS the Practical Way — Part 3: Building Secure APIs with Amazon API Gateway and Amazon…</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning the AWS the Practical Way — Part 2: Amazon DyanmoDB Deep Dive]]></title>
            <link>https://aws.plainenglish.io/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f88aa4e5f1c</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[deep-dives]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 12:01:56 GMT</pubDate>
            <atom:updated>2025-10-15T15:25:43.146Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Learning AWS the Practical Way — Part 2: Amazon DyanmoDB Deep Dive</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*OqI1NDQ8arXRzaddtd7sig.png" /></figure><p>I started a series called <a href="https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way</strong></a>. The idea is simple. I explore AWS services by building with them and sharing what I learn. Each post focuses on one service, explains how it works, and shows how it connects to a real application.</p><p>In the previous part, we looked at <strong>AWS Lambda</strong>, the compute layer that made serverless mainstream. We saw how it lets you focus purely on your code while AWS takes care of the scaling and infrastructure. It also became the starting point for building the backend of the <strong>JobTrackr</strong> application.</p><p>Now every serverless application needs a reliable way to store and retrieve data, and that is where <strong>Amazon DynamoDB</strong> comes in. It is a fully managed NoSQL database by AWS that delivers fast and consistent performance at any scale. You can think of it as serverless for databases because you do not need to handle provisioning, patching, or scaling.</p><p>This post takes a deeper look at Amazon DynamoDB and how it fits into the serverless ecosystem. If you prefer the hands-on part, feel free to move straight to the demo section.</p><p><strong>In this article we will cover:</strong></p><ul><li><strong>What is Amazon DynamoDB</strong></li><li><strong>How it evolved into one of today’s most widely used NoSQL services</strong></li><li><strong>Who uses it and why, with common use cases</strong></li><li><strong>Why developers choose DynamoDB</strong></li><li><strong>Best Practices for Building with DynamoDB</strong></li><li><strong>A demo of integrating DynamoDB with AWS Lambda</strong></li></ul><h3>What is Amazon DynamoDB</h3><p><strong>Amazon DynamoDB</strong> is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. It is designed to handle workloads of any size, from small applications to enterprise systems serving millions of requests per second.</p><p>At its core, DynamoDB organizes data into <strong>tables</strong>. Each table stores <strong>items</strong>, which you can think of as individual records or rows. Every item is made up of <strong>attributes</strong>, similar to the columns in a spreadsheet. Each item is uniquely identified using a <strong>primary key</strong>, which can be just a <strong>partition key</strong> or a combination of a <strong>partition key and a sort key</strong>.</p><p>DynamoDB stands out for its simplicity and speed. You do not need to manage servers or worry about scaling as your application grows. AWS handles storage, replication, and availability in the background so your data remains secure and always accessible. For applications that need even faster performance, DynamoDB offers <strong>DAX (DynamoDB Accelerator)</strong>, an in-memory cache that reduces response times from milliseconds to microseconds.</p><p>In short, DynamoDB acts as <strong>serverless storage for your data</strong>. You define what to store and how to use it, and AWS ensures it stays fast and reliable.</p><h3>How it evolved into one of today’s most widely used NoSQL services</h3><p>In the early 2000s, Amazon’s growing e-commerce platform faced major challenges during high-traffic events like Black Friday and the holiday season. Traditional databases could not scale fast enough to handle millions of transactions in real time. To solve this, Amazon engineers built an internal system called <strong>Dynamo</strong>, designed to stay highly available and resilient even when servers failed. It introduced concepts like distributed storage, automatic partitioning, and data replication, allowing the system to scale horizontally as demand increased.</p><p>In <strong>2007</strong>, Amazon published the <strong>Dynamo research paper</strong>, which described the architecture and design principles behind the system. The paper focused on ideas such as eventual consistency, partition tolerance, and high availability. These concepts later became the foundation of modern NoSQL databases. It quickly gained recognition in the tech community and inspired systems like <strong>Apache Cassandra</strong>, <strong>Riak</strong>, and Amazon’s own next-generation managed database service.</p><p>In <strong>2012</strong>, AWS launched <strong>Amazon DynamoDB</strong>, a fully managed cloud database built on Dynamo’s design principles. DynamoDB preserved the ideas of distributed storage and automatic scaling but added cloud-native capabilities such as built-in replication, seamless scaling, and deep integration with other AWS services. Over the years, it introduced several key improvements:</p><p><strong>2013–2014:</strong> Added <strong>Local and Global Secondary Indexes (LSI and GSI)</strong> for more flexible queries and introduced <strong>DynamoDB Streams</strong> for real-time event tracking, which later integrated with AWS Lambda for event-driven processing.</p><p><strong>2017–2018:</strong> Introduced <strong>Global Tables</strong> for multi-region replication and <strong>On-Demand Capacity Mode</strong> for flexible, pay-per-request scaling. These updates marked DynamoDB’s shift toward a fully serverless model.</p><p><strong>2019–2020:</strong> Added <strong>ACID Transactions</strong> for consistent multi-item operations, <strong>Point-in-Time Recovery (PITR)</strong> for data protection, and <strong>encryption by default</strong> for enhanced security.</p><p><strong>2021–2023:</strong> Introduced <strong>PartiQL</strong> for SQL-style queries, <strong>Adaptive Capacity</strong> for automatic performance balancing, and <strong>DAX (DynamoDB Accelerator)</strong> for in-memory caching that delivers microsecond response times.</p><p>What began as an internal system to power Amazon’s online store evolved into a cloud-scale database service that continues to shape how modern, serverless applications manage data efficiently.</p><h3>Who Uses It and Why, with Common Use Cases</h3><p><strong>Amazon DynamoDB</strong> is built for applications that need to manage data at any scale with consistent speed and reliability. Its automatic scaling, low latency, and serverless design make it ideal for real-time and high-traffic workloads across industries.</p><p><strong>Common use cases include:</strong></p><ul><li><strong>E-commerce catalogs:</strong> DynamoDB powers product listings, prices, and inventory data for online stores that experience unpredictable traffic. Its fast lookups and automatic scaling keep shopping experiences smooth during events like flash sales or Black Friday.</li><li><strong>Gaming leaderboards:</strong> Many gaming platforms use DynamoDB to maintain player rankings, achievements, and match data in real time. It can handle thousands of simultaneous updates per second while keeping read and write operations consistent.</li><li><strong>IoT data storage:</strong> IoT applications use DynamoDB to store continuous streams of sensor readings and device logs. Its ability to scale seamlessly and integrate with services like AWS Lambda and Kinesis makes it perfect for processing live data.</li><li><strong>Chat and messaging apps:</strong> DynamoDB supports real-time conversations by storing messages, chat history, and user activity. It ensures that reads and writes happen instantly, even when thousands of users are active at once.</li><li><strong>User profiles and sessions:</strong> Web and mobile apps store user preferences, authentication details, and session data in DynamoDB to personalize experiences. Its high availability ensures users can always access their accounts without delay.</li></ul><p>Because of this flexibility and reliability, companies such as <strong>Netflix</strong>, <strong>Airbnb</strong>, <strong>Lyft</strong>, <strong>Twitch</strong>, <strong>Disney+</strong>, and <strong>Amazon</strong> rely on DynamoDB to power critical workloads. Netflix uses it to manage streaming session data and metadata for millions of users. Lyft tracks rides and driver activity in real time. Disney+ uses it to store user preferences, viewing history, and content metadata to deliver personalized recommendations and a smooth streaming experience at scale.</p><p>During <strong>Amazon’s Prime Day 2025</strong>, <strong>DynamoDB</strong> reached a record peak of <strong>151 million requests per second</strong>, processing <strong>trillions of requests over the event</strong> while maintaining single-digit millisecond latency. This level of performance highlights DynamoDB’s unmatched scalability and reliability in supporting some of the largest workloads in the world.</p><h3>Why Developers Choose (and Avoid) DynamoDB</h3><p>DynamoDB is one of the most popular databases in the cloud because it removes most of the operational work involved in managing infrastructure. Developers can build fast, reliable applications without worrying about scaling, replication, or server maintenance.</p><h4>Advantages</h4><ul><li><strong>Fully managed and serverless:</strong> Handles scaling, patching, replication, and backups automatically, allowing developers to focus on application logic instead of infrastructure.</li><li><strong>High performance:</strong> Delivers consistent single-digit millisecond latency for reads and writes, even under heavy workloads. Ideal for real-time apps like gaming, e-commerce, and streaming.</li><li><strong>Automatic scaling:</strong> Adjusts capacity instantly as traffic changes. Adaptive capacity ensures smooth performance during sudden spikes.</li><li><strong>Global availability:</strong> Replicates data across multiple Availability Zones by default. With Global Tables, you can set up multi-region replication for low-latency access worldwide.</li><li><strong>AWS integration:</strong> Works seamlessly with AWS Lambda, API Gateway, Kinesis, CloudWatch, and IAM. Includes DAX for in-memory caching and microsecond response times.</li><li><strong>Flexible data model:</strong> Schemaless design allows records to have different attributes, making it easier to adapt your data structure over time.</li></ul><h4>Limitations</h4><ul><li><strong>Careful data modeling:</strong> DynamoDB does not support joins or complex queries. Tables must be designed around specific access patterns, which requires planning and a different mindset from relational databases.</li><li><strong>Partition key design:</strong> Performance depends on distributing traffic evenly across partitions. Poor key design can cause “hot keys” that slow down queries or lead to throttling.</li><li><strong>Limited query flexibility:</strong> DynamoDB is optimized for speed and scale, not for analytics or ad-hoc queries. It works best when your access patterns are well-defined and predictable.</li><li><strong>Item size constraints:</strong> Each item can be up to 400 KB. Large files or images should be stored in S3, with DynamoDB used to store only metadata or links.</li><li><strong>Vendor lock-in:</strong> As an AWS-managed service, DynamoDB ties your application to the AWS ecosystem. Migrating to other platforms can require significant rework.</li></ul><h4>Pricing Explained</h4><p>DynamoDB pricing is based on what you use, including how much you read, write, and store. There are no servers to manage or licenses to buy. You only pay for what your application actually uses.</p><p>Before diving into pricing, it helps to understand two important terms.</p><p>A <strong>Write Capacity Unit (WCU)</strong> represents one write per second for an item up to 1 KB in size.</p><p>A <strong>Read Capacity Unit (RCU)</strong> represents one strongly consistent read per second for an item up to 4 KB in size.</p><p>If you use <strong>eventually consistent reads</strong>, they count as half an RCU, allowing twice as many reads for the same cost.</p><p><strong>On-Demand Mode<br></strong>In on-demand mode, DynamoDB automatically handles scaling and you pay only for the actual reads and writes your application performs. It is best for unpredictable or spiky workloads where traffic can vary throughout the day.</p><ul><li><strong>Read requests:</strong> about <strong>0.25 dollars per million</strong></li><li><strong>Write requests:</strong> about <strong>1.25 dollars per million</strong></li></ul><p><strong>Provisioned Mode<br></strong>Provisioned mode is designed for stable or predictable workloads. You specify the number of RCUs and WCUs your table needs. DynamoDB reserves that capacity and guarantees it is always available.</p><ul><li><strong>1 RCU:</strong> about <strong>0.00013 dollars per hour</strong> (~<strong>0.09 dollars per month</strong>)</li><li><strong>1 WCU:</strong> about <strong>0.00065 dollars per hour</strong> (~<strong>0.47 dollars per month</strong>)</li></ul><p><strong>Storage and Backups<br></strong>Storage costs depend on how much data you store and how frequently you access it.</p><ul><li><strong>Standard Table Class:</strong> about <strong>0.25 dollars per GB per month</strong></li><li><strong>Standard-Infrequent Access (IA):</strong> about <strong>0.10 dollars per GB per month</strong></li></ul><p>For backups, DynamoDB provides two options:</p><ul><li><strong>On-demand backups:</strong> about <strong>0.10 dollars per GB per month</strong></li><li><strong>Point-in-time recovery (PITR):</strong> about <strong>0.20 dollars per GB per month</strong>, allowing recovery to any second within the last 35 days.</li></ul><h4><strong>Example Scenario</strong></h4><p>Imagine a small web app that performs around 10 million reads and 2 million writes per month using on-demand mode.</p><ul><li>Reads: 10 million × $0.25 = <strong>$2.50</strong></li><li>Writes: 2 million × $1.25 = <strong>$2.50</strong></li><li>Storage: 5 GB × $0.25 = <strong>$1.25</strong></li><li>Backup (PITR): 5 GB × $0.20 = <strong>$1.00</strong></li></ul><p><strong>Total: around $7 per month</strong></p><p>For just a few dollars, you get a fully managed, serverless database with automatic scaling, high availability, and continuous backup protection.</p><h3>Best Practices for Building with DynamoDB</h3><p>To get the most out of DynamoDB, it helps to follow a few key design and performance practices. These will make your tables faster, cheaper, and easier to maintain.</p><p><strong>Design around access patterns</strong><br>Plan your table design based on how your application will query data. In DynamoDB, you model for access patterns, not relationships. Each use case should ideally be served by a primary key or index lookup, not a table scan. For example, to fetch all orders for a customer, you might design the table with CustomerID as the partition key and OrderDate as the sort key.</p><p><strong>Use indexes wisely</strong><br>Global and Local Secondary Indexes (GSI and LSI) help you search data in more ways, but they also add extra cost. Create indexes only for the queries your app really needs and include only the necessary attributes. LSIs have to be set up when you create the table, so plan them early if you need them.</p><p><strong>Avoid hot partitions</strong><br>DynamoDB performance depends on spreading traffic evenly across partitions. If one key receives too many requests, it can overload a single partition and slow down your app. For example, if all posts for a celebrity like <strong>@Cristiano</strong> use the same partition key, that key can become “hot” when millions of fans interact with it at once. To prevent this, add randomness or buckets to the key (like <strong>@Cristiano_A</strong>, <strong>@Cristiano_B</strong>, etc.) so DynamoDB distributes the load evenly across partitions.</p><p><strong>Use TTL for automatic cleanup</strong><br>If your app stores temporary data such as sessions, cache entries, or logs, enable <strong>Time to Live (TTL)</strong>. DynamoDB automatically deletes expired items after their timestamp passes, freeing up storage without using extra write capacity. It’s a simple way to keep tables clean and costs low.</p><p><strong>Leverage DynamoDB Streams</strong><br>Streams record every change in your table and can trigger AWS Lambda functions in real time. This helps build event-driven features like sending notifications, updating analytics dashboards, or syncing data to Elasticsearch.</p><p><strong>Optimize performance</strong><br>Keep items small and store only the attributes you need to reduce latency. Use <strong>eventually consistent reads</strong> to improve speed and cut read costs in half. Apply <strong>conditional writes</strong> to maintain accuracy when multiple users update the same item. Add <strong>DAX caching</strong> to quickly serve frequent reads and reduce load on the table.</p><p>These are not the only best practices, but they cover the most important ones. Following them will help you build DynamoDB tables that are efficient, reliable, and ready to handle production workloads.</p><h3>A demo of integrating DynamoDB with AWS Lambda</h3><p>Let’s see DynamoDB and AWS Lambda in action through the <strong>JobTrackr</strong> app. In this demo, Lambda connects to DynamoDB to store and retrieve job details, showing how both services work together to create a fast and scalable serverless backend.</p><h4><strong>Step 1: Table Design</strong></h4><p>The <strong>UsersJobs</strong> table stores all job postings for each user in the <strong>JobTrackr</strong> app. It uses a <strong>composite primary key</strong> so every user’s jobs are grouped together and sorted by the time they were added.</p><p><strong>Primary Key Structure</strong></p><ul><li><strong>PK (Partition Key):</strong> USER#&lt;user_id&gt; — identifies the user.</li><li><strong>SK (Sort Key):</strong> JOB#&lt;applied_ts_iso&gt;#&lt;job_id&gt; — identifies each job posting and keeps them in order by date.</li></ul><p><strong>Important Attributes</strong></p><ul><li><strong>user_id: </strong>unique ID of the user.</li><li><strong>job_id: </strong>unique ID for each job posting.</li><li><strong>company: </strong>name of the company.</li><li><strong>title: </strong>job title or position.</li><li><strong>status: </strong>current stage of the application, such as <em>Captured</em>, <em>Applied</em>, or <em>Interviewing</em>.</li><li><strong>job_url: </strong>link to the original job posting.</li><li><strong>last_updated_ts: </strong>last time the job entry was updated.</li><li><strong>notes: </strong>optional notes or reminders added by the user.</li></ul><p>This design keeps all of a user’s jobs neatly organized, easy to query, and fast to update.</p><h4>Step 2: Creating Indexes and Access Patterns</h4><p>Indexes make DynamoDB powerful because they let you query data in different ways without scanning the whole table. For the <strong>UsersJobs</strong> table in <em>JobTrackr</em>, I added one extra index to handle company-specific searches more efficiently.</p><p><strong>Main Table</strong></p><ul><li><strong>Partition Key:</strong> USER#&lt;user_id&gt;</li><li><strong>Sort Key:</strong> JOB#&lt;applied_ts&gt;#&lt;job_id&gt;</li><li><strong>Use case:</strong> Get all jobs for a user, sorted by the time they were added.</li></ul><p><strong>GSI1 — Company Filter Index</strong></p><ul><li><strong>Name:</strong> GSI1</li><li><strong>Partition Key:</strong> USER#&lt;user_id&gt;</li><li><strong>Sort Key:</strong> COMPANY#&lt;company&gt;#&lt;applied_ts&gt;#&lt;job_id&gt;</li><li><strong>Projection:</strong> ALL</li><li><strong>Use case:</strong> Fetch all jobs for a user from a specific company.</li></ul><p>With this setup, the app can run queries like <em>“Show all jobs from Google for this user”</em> instantly, without affecting the performance of the main table.</p><p><strong>Access Patterns</strong></p><ul><li>Get all jobs for a user → Query using PK and SK</li><li>Get jobs by company → Query using GSI1PK and GSI1SK</li><li>Get a specific job → Use GetItem with PK and SK</li></ul><p>By aligning the design with these access patterns, the database stays fast, predictable, and cost-efficient as data grows.</p><h4>Step 3: Integrating with AWS Lambda</h4><p>Once the table and indexes were ready, the next step was to connect everything through AWS Lambda. I updated the existing Lambda function from the previous part so that whenever a new job URL is processed in <strong>JobTrackr</strong>, the analyzed and cleaned data is automatically written into the <strong>UsersJobs</strong> table. Each record includes details like company name, job title, status, and timestamps, all stored under the user’s partition key.</p><p>To make data retrieval easier, I also created a new API endpoint, <strong>GET /api/jobs</strong>, which returns all stored jobs for a user with built-in pagination. The API accepts parameters like user_id, limit, and an optional next_page_token. Behind the scenes, it uses DynamoDB’s <strong>query</strong> operation to fetch the most recent jobs first and includes a <strong>LastEvaluatedKey</strong> that helps the client load the next set of results when needed.</p><p>This setup keeps the flow efficient and scalable. Lambda acts as the processing layer, DynamoDB serves as the data backbone, and the frontend retrieves jobs smoothly one page at a time without overloading the system.</p><h4>Step 4: Update, Test, and Deploy</h4><p>With the new functionality in place, I updated the existing AWS SAM template to include the DynamoDB table configuration and the new API route. I then followed the same process as before to rebuild and redeploy my Lambda function along with its updated dependencies and shared layer.</p><p>After deployment, I tested the complete flow by adding a job URL, confirming that it was stored in DynamoDB, and retrieving it through the paginated GET /api/jobs API. Everything worked smoothly, showing that the Lambda and DynamoDB integration was successfully up and running.</p><h4>Step 5: Best Practices Followed</h4><p>While building this integration, I focused on a few key best practices to keep the setup efficient and scalable:</p><ul><li><strong>Modeled data around access patterns</strong> so every query used keys or indexes instead of scans.</li><li><strong>Used conditional writes</strong> to maintain accuracy when multiple updates happened at the same time.</li><li><strong>Optimized reads</strong> by keeping items small and using eventually consistent reads where possible.</li><li><strong>Secured access with IAM policies</strong> and ensured all data was encrypted at rest.</li></ul><p>These practices kept the <strong>JobTrackr</strong> backend simple, reliable, and ready to handle real traffic. With <strong>Amazon DynamoDB</strong> now serving as the persistent data layer, it completes the serverless backend foundation powered by <strong>AWS Lambda</strong>, bringing the architecture one step closer to a fully scalable and production-ready system.</p><h3>Wrapping up</h3><p>With this part, we have connected the key pieces of a serverless backend, with AWS Lambda handling compute and Amazon DynamoDB managing data storage. Together, they form a fast, scalable, and low-maintenance foundation that powers JobTrackr’s backend seamlessly.</p><p>This integration showed how a few well-designed components can handle real workflows like adding and retrieving job postings efficiently. By designing around access patterns, using conditional writes, and optimizing reads, the setup stays both cost-effective and production-ready.</p><p>In the next part of the series, we will take this a step further by adding Amazon Cognito for user authentication and API Gateway as the secure entry point for all backend APIs. These two services will complete the application’s core architecture and turn it into a fully serverless, end-to-end system.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way Series</strong></a>→ This post is part of my ongoing series. You can start from the beginning here to follow along as we explore the broader serverless ecosystem.</p><p><a href="https://github.com/anpise/JobTrackr"><strong>GitHub</strong></a> → You can find the supporting code from this demo on my GitHub.</p><p>Have you tried Amazon DynamoDB before? What’s your favorite (or most challenging) use case? Share in the comments, I’d love to hear and compare experiences.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f88aa4e5f1c" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c">Learning the AWS the Practical Way — Part 2: Amazon DyanmoDB Deep Dive</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning AWS the Practical Way 
Part 1: AWS Lambda Deep Dive]]></title>
            <link>https://aws.plainenglish.io/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/edccc4d944d6</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[deep-dives]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Fri, 03 Oct 2025 12:01:59 GMT</pubDate>
            <atom:updated>2025-10-14T05:57:21.941Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Learning AWS the Practical Way — Part 1: AWS Lambda Deep Dive</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*dcATx_ZKvU4ZbJp1fAkknA.png" /></figure><p>I started a series called <a href="https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way</strong></a>. The idea is simple: I explore AWS services by building with them and sharing what I learn. Each post focuses on one service, dives into how it works, and shows how it connects into a real application.</p><p>This first part dives into <strong>AWS Lambda</strong>, the service that kicked off the serverless movement. We’ll cover what it is, its journey from launch to one of AWS’s most widely used services, and how it powers real applications. I’ll also share a quick demo of how I set up a Lambda function for my <strong>JobTrackr</strong> app.</p><p>This post goes in-depth to give you a complete picture of AWS Lambda. If you’d rather jump straight into the hands-on part, feel free to skip ahead to the demo section.</p><p>In this article we will cover:</p><ul><li><strong>What is AWS Lambda</strong></li><li><strong>Its evolution from launch to today</strong></li><li><strong>Who uses it and why, with common use cases</strong></li><li><strong>Why Developers Choose (and Avoid) Lambda</strong></li><li><strong>Best practices for building with Lambda</strong></li><li><strong>A demo of creating a Lambda function for JobTrackr</strong></li></ul><h3><strong>What is AWS Lambda</strong></h3><p>AWS Lambda is a serverless compute service. In simple words, you write the code and AWS runs it for you. You do not have to worry about servers, scaling, or infrastructure in the background. Instead of spending time and money on building and managing infrastructure, you just focus on writing scalable code.</p><p>A Lambda function runs only when an event occurs. It stays idle until something triggers it, and then executes the code exactly when needed. This makes it easy to build small pieces of logic that respond instantly without having to manage servers running all the time.</p><p>Every Lambda function is built around three core components:</p><ul><li><strong>Code and runtime: </strong>The logic you write and the language environment it runs in, such as Python, Node.js, or Java.</li><li><strong>Execution role:</strong> The permissions that allow the function to access other AWS services, such as reading from DynamoDB or writing to S3.</li><li><strong>Events: </strong>The actions that invoke the function, such as an API request, an S3 file upload, a DynamoDB update, or a scheduled task.</li></ul><p>Together, these components let you focus on your code while AWS takes care of infrastructure and scaling.</p><h3>The Evolution of Lambda</h3><p>AWS Lambda was introduced at <strong>AWS re:Invent 2014</strong>. At that time, developers were often keeping servers alive just to run occasional tasks like file uploads or database updates. Most of the time those servers sat idle, wasting money and effort. Lambda solved this by letting you upload code that runs only when an event occurs.</p><p>Here’s how Lambda has evolved over the years:</p><ul><li><strong>2014</strong>: The first release supported only Node.js. Functions could run for up to 60 seconds and were triggered by a small set of services including S3, DynamoDB, and Kinesis. Despite these limits, it was the start of serverless computing.</li><li><strong>2015–2016</strong>: Lambda expanded with new language support like Java and Python. Functions could run longer, connect securely to VPC networks, and respond to more AWS services. During this phase, AWS also introduced the Serverless Application Model (SAM), an Infrastructure as Code (IaC) framework that made it easier to define and deploy applications consistently.</li><li><strong>2017–2018</strong>: Functions could be triggered by Amazon SQS, making it easier to build event-driven applications. AWS also introduced Lambda Layers to share common code across functions and custom runtimes to support more programming languages.</li><li><strong>2019–2020</strong>: Lambda introduced provisioned concurrency to reduce cold start delays, increased memory and execution time limits, added support for deploying functions as container images, and enabled integration with Elastic File System (EFS) for shared storage.</li><li><strong>2021–2022</strong>: AWS added support for ARM-based Graviton processors to improve speed and lower costs, introduced Lambda Extensions for better monitoring, HTTPS endpoints for direct invocation, and SnapStart to speed up Java functions.</li><li><strong>2023–Beyond</strong>: Lambda gained faster scaling to handle unpredictable traffic, response streaming, improved logging and search controls, extended SnapStart to ARM64 Java functions, and new developer tools like a VS Code-based console editor.</li></ul><p>From its early preview in 2014, Lambda has evolved into one of the most important building blocks of cloud computing, powering trillions of executions every month and enabling developers to build serverless and event-driven applications at scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*AK-s3yddFGuJ0pW2BKnlEA.png" /><figcaption>AWS Lambda at the core of an event-driven architecture. Triggers on the left invoke the function, which sends results to destinations on the right.</figcaption></figure><h3>Who Uses Lambda and Common Use Cases</h3><p>Lambda is used by a wide range of users, from students or solo developers just starting with the cloud to large companies running production systems. It is easy to set up, and AWS offers a generous free tier, which makes it especially attractive for beginners. At the same time, its ability to scale automatically and charge only for what you use has made it a favorite for enterprises as well.</p><h4>Common Use Cases</h4><p><strong>Real-time data and analytics</strong><br>Lambda can process streams from services like Amazon Kinesis or DynamoDB Streams the moment data arrives. It is often used for log analysis, anomaly detection, clickstream tracking, or monitoring sensor data in real time.</p><p><strong>File processing</strong><br>When a file is uploaded to Amazon S3, a Lambda function can be triggered automatically. This makes it easy to generate image thumbnails, transcode videos, scan and index documents, or apply transformations as soon as files are added or updated.</p><p><strong>Web applications and APIs</strong><br>Developers often pair Lambda with API Gateway or Lambda Function URLs to build RESTful APIs and serverless backends that scale with demand. This approach works well for microservices and event-driven endpoints where traffic may fluctuate.</p><p><strong>Mobile and IoT backends</strong><br>Mobile apps and IoT devices frequently rely on Lambda for backend logic. Services such as API Gateway or IoT Core trigger functions to handle authentication, process device messages, or respond to user actions without the need to maintain servers.</p><p><strong>Automation and integration</strong><br>Lambda is often used to connect AWS services together. It reacts to events from SNS, SQS, DynamoDB, or CloudWatch and automates workflows like sending alerts, syncing data, or executing background jobs asynchronously.</p><p><strong>Scheduled tasks</strong><br>With Amazon EventBridge, Lambda functions can run on a fixed schedule. This makes it ideal for recurring jobs such as daily cleanups, nightly report generation, or regular system maintenance that would otherwise require a dedicated cron server.</p><p>These patterns are already in use across industries. <strong>Thomson Reuters</strong> uses AWS Lambda to process up to 4,000 events per second for its usage analytics service, reliably handling sudden traffic spikes. <strong>iRobot</strong> builds its connected Roomba platform on AWS Lambda and AWS IoT, with a small team managing millions of devices. <strong>Netflix</strong> uses AWS Lambda to create rule-based, self-managing infrastructure that helps reduce errors and save time.</p><p>Together, these examples show how Lambda powers everything from consumer products to enterprise-scale systems, making it one of the most versatile services in the AWS ecosystem.</p><h3>Why Developers Choose (and Avoid) Lambda</h3><p>AWS Lambda is popular because it removes the burden of managing servers and scales automatically while charging only for active use. Like any service, it also has trade-offs around performance, cost, and workload fit.</p><h4>Benefits</h4><p>Lambda offers several advantages that make it attractive for developers and organizations:</p><ul><li><strong>No servers to manage:</strong> AWS handles provisioning, patching, and maintenance, letting developers focus entirely on code.</li><li><strong>Cost efficiency:</strong> pay only for requests and execution time, measured in milliseconds, with no charges for idle resources.</li><li><strong>Automatic scaling:</strong> workloads expand instantly from a single request to thousands per second and scale back to zero when idle.</li><li><strong>Seamless AWS integration:</strong> connects natively with services like S3, DynamoDB, API Gateway, and EventBridge for event-driven systems.</li><li><strong>Flexible language support:</strong> works with Python, Node.js, Java, Go, C#, Ruby, and custom runtimes for broader adoption.</li></ul><h4><strong>Drawbacks</strong></h4><p>While Lambda is powerful, there are limits and trade-offs to consider:</p><ul><li><strong>Cold starts:</strong> functions may pause briefly if they haven’t been invoked recently, adding latency for the first request.</li><li><strong>Execution time limit:</strong> each invocation is capped at 15 minutes, making it unsuitable for long-running jobs.</li><li><strong>Costs at scale:</strong> for always-on or heavy workloads, Lambda may be more expensive than EC2 or containers.</li><li><strong>Stateless design:</strong> functions cannot keep session state in memory and only have limited temporary storage, requiring external services for persistence.</li><li><strong>Debugging complexity:</strong> short-lived, event-driven executions are harder to trace and test compared to monolithic apps.</li><li><strong>Memory and performance limits:</strong> Lambda functions can use up to 10 GB of memory. Increasing memory boosts CPU and network throughput but also raises cost per invocation and can make tuning performance less predictable for compute-heavy tasks.</li></ul><h4>Pricing explained</h4><p>AWS Lambda uses a pay-as-you-go model, meaning you only pay when your function runs. Costs are based on two factors: the number of function invocations and the duration of execution, measured in gigabyte-seconds (GB-s) of memory. There are no charges for idle functions or simply having them deployed.</p><ul><li><strong>Always-free tier:</strong> Every account gets 1 million free requests and 400,000 GB-seconds of compute time per month, forever. Many small or infrequent workloads fit entirely within this tier.</li><li><strong>Requests:</strong> After the free tier, each million requests costs $0.20.</li><li><strong>Compute duration:</strong> Charged at about $0.0000167 per GB-second in most regions, based on the memory you set and how long the function runs.</li><li><strong>Memory and CPU link:</strong> More memory also means more CPU. While this raises the per-second price, it often makes the function finish faster, which can actually reduce the total bill.</li><li><strong>Provisioned Concurrency:</strong> For latency-sensitive apps, you can pay a small hourly fee to keep functions “warm” and avoid cold starts.</li></ul><h4><strong>Example calculation</strong></h4><p>Imagine you have a Lambda function that runs 1 million <strong>times</strong> in a month. Each run uses 256<strong>MB of memory</strong> and takes about 1 <strong>second</strong> to finish.</p><p><strong>With free tier:</strong></p><ul><li><strong>Requests:</strong> First 1M requests are free → <strong>$0</strong></li><li><strong>Compute time:<br></strong>0.25 GB × 1 s = <strong>0.25 GB-seconds per request<br></strong>1M × 0.25 = <strong>250,000 GB-seconds total<br></strong>Free tier gives 400k GB-seconds → fully covered → <strong>$0</strong></li></ul><p><strong>Total:</strong> <strong>$0 per month</strong></p><p><strong>Without free tier:</strong></p><ul><li><strong>Requests:</strong> 1M × $0.20 per million = <strong>$0.20</strong></li><li><strong>Compute time:</strong> 250,000 GB-seconds × $0.0000167 per GB-second ≈ <strong>$4.18</strong></li></ul><p><strong>Total:</strong> About <strong>$4.20 per month</strong></p><p>AWS Lambda reshapes cloud development by taking care of servers and scaling so developers can focus purely on code. With its free tier, simple pricing, and ability to support everything from small experiments to enterprise workloads, it has become a go-to choice for modern applications.</p><h3>Best Practices for Building with Lambda</h3><p>To get the most out of AWS Lambda, you need to design with performance, cost, reliability, and security in mind. Here are some widely recommended practices:</p><p><strong>Use environment variables for configuration</strong><br>Keep secrets, connection strings, and config values out of code. Pass them as environment variables, encrypt sensitive ones with KMS, and update them per environment (dev/test/prod) without code changes.</p><p><strong>Use aliases and safe deployments</strong><br>Leverage Lambda versions and aliases to manage releases. Combine with deployment strategies like canary or linear traffic shifting for safer rollouts instead of deploying straight to production.</p><p><strong>Apply least-privilege IAM policies</strong><br>Assign each function the minimum permissions it needs. Restrict S3 or DynamoDB access to the specific buckets, tables, or prefixes required. Smaller blast radius means better security.</p><p><strong>Optimize cold starts by reusing execution context</strong><br>Move database connections, HTTP clients, or configuration loads outside the handler so they can be reused when the container stays warm. Use /tmp for caching generic data, but never rely on it for request-specific or sensitive info.</p><p><strong>Keep packages lean</strong><br>Remove unused libraries, use Lambda Layers for shared dependencies, and avoid bloated deployment packages. Smaller code bundles reduce cold start times and improve maintainability.</p><p><strong>Design for retries and idempotency</strong><br>Make functions idempotent so repeated retries do not duplicate work. Use unique IDs or conditional writes, and configure a Dead Letter Queue (SQS or SNS) to capture events that fail after multiple attempts.</p><p><strong>Monitor and log everything</strong><br>Use CloudWatch Logs, metrics, and alarms to track errors, latency, and memory use. Add tracing with AWS X-Ray to understand bottlenecks. Good observability is critical in serverless.</p><p><strong>Tune memory and timeouts</strong><br>More memory also means more CPU. Find the balance between runtime and cost. Sometimes more memory lowers overall cost by running faster. Use CloudWatch logs or the Lambda Power Tuning tool to optimize settings.</p><p>These are not the only best practices, but they cover the most important areas. Following them helps ensure your Lambda functions are secure, efficient, and ready for production.</p><h3><strong>A demo of creating a Lambda function for JobTrackr</strong></h3><p>To bring everything together, let’s look at how I built and deployed a Lambda function for my JobTrackr app. The goal of this function is simple: take in a job posting URL, validate and sanitize it, process the content, send it to Amazon Bedrock for analysis, and return a clean, structured response.</p><h4><strong>Step 1: Structure and Flow</strong></h4><p>I used a simple handler–router pattern so the Lambda knows which logic to run based on the request path. For example, if the path is /api/jobs/ingest, it routes to the ingestion flow.</p><p>The ingestion flow itself has three main steps:</p><ul><li><strong>Clean and parse</strong> the request body</li><li><strong>Validate</strong> the job URL before using it</li><li><strong>Scrape and analyze</strong> the job content with separate functions for better organization</li></ul><p>This keeps the code modular and makes it easier to extend later.</p><p>For now, the function focuses only on ingestion and analysis. DynamoDB for storage will come in the next part of this series.</p><h4><strong>Step 2: Package the Function with AWS SAM</strong></h4><p>At first, I ran into a lot of problems trying to bundle Python dependencies manually. Some libraries worked locally but failed on Lambda because of version mismatches between my system and the Lambda runtime.</p><p>The solution was to use <strong>AWS SAM (Serverless Application Model)</strong> with a <strong>Lambda Layer</strong>. The layer keeps dependencies separate from the main function code, so the package is smaller and easier to deploy.</p><p>I defined both the function and the layer in a template.yaml file, where I set the runtime, memory, timeout, IAM permissions, and linked the function to the dependency layer.</p><p>sam build --use-container → builds the function and dependencies inside a container that matches the Lambda runtime, solving version mismatch issues.</p><p>This produced a clean, deployment-ready package without me having to worry about Python version conflicts.</p><h4>Step 3: Test Locally with AWS SAM</h4><p>Before deploying, I tested the function locally using AWS SAM. It provides two useful commands:</p><p>sam local invoke → lets you call the function with a test event to check the logic.</p><p>sam local start-api → spins up a local API endpoint, so you can send HTTP requests and see how the Lambda handles real inputs.</p><p>For example, here’s a minimal test event I used with sam local invoke:</p><pre>{<br>  &quot;path&quot;: &quot;/api/jobs/ingest&quot;,<br>  &quot;httpMethod&quot;: &quot;POST&quot;,<br>  &quot;body&quot;: &quot;{\&quot;url\&quot;: \&quot;https://jobs.example.com/posting/123\&quot;}&quot;<br>}</pre><p>This allowed me to debug logic and dependencies directly on my machine, with the layer included, without redeploying every time. It sped up development and made troubleshooting much easier.</p><h4>Step 4: Deploy to AWS</h4><p>Once the function was packaged and tested locally, I moved on to deployment. I actually tried both approaches using AWS SAM and the AWS Console, and here’s how it went:</p><p><strong>Option A → Deploy with AWS SAM (recommended)</strong></p><p>First-time guided deploy:<br>sam deploy --guided→ This walked me through the stack name, region, S3 bucket for storing build artifacts, and IAM permissions. Once done, SAM saved the config so I wouldn’t need to re-enter it again.</p><p>sam deploy→ This used the saved config to package, upload, and deploy everything in one step.</p><p><strong>Option B → Deploy from AWS Console</strong></p><ul><li>I also tested deploying through the console: <strong>AWS Console → Lambda → Create function</strong>.</li><li>I uploaded the ZIP file generated by <strong>sam build</strong> under the Code section. Since direct ZIP uploads are limited to 50 MB compressed (250 MB uncompressed), I used S3 to store and link the package instead.</li><li><strong>Lambda Layers</strong> also have a <strong>50 MB compressed limit</strong>, and using them for dependencies is the right way to keep the main function package lightweight and easier to update.</li><li>I configured the runtime (Python 3.12), handler, memory, and timeout.</li><li>I added environment variables like FIRECRAWL_API_KEY and BEDROCK_MODEL_ID.</li><li>I attached an <strong>execution role</strong> with only the necessary permissions (CloudWatch Logs, Bedrock, and S3).</li><li>Finally, I tested the function with a sample event directly in the console to confirm everything was working.</li></ul><p>In practice, you could also use the <strong>AWS CLI</strong> to deploy by uploading your ZIP and creating the function with a single command. But for most projects, I recommend <strong>SAM</strong>, because it makes deployments repeatable, consistent, and much easier to maintain over time.</p><h4><strong>Step 5: Best Practices Applied</strong></h4><p>To keep the Lambda function efficient, secure, and maintainable, I applied several best practices throughout the build and deployment process:</p><ul><li><strong>Connection reuse</strong>: Initialized the scraper and Bedrock clients outside the handler to avoid re-creating them on every run.</li><li><strong>Environment variables</strong>: Used environment variables (FIRECRAWL_API_KEY, BEDROCK_MODEL_ID) for configuration instead of hardcoding values.</li><li><strong>Layers for dependencies</strong>: Moved dependencies into a Lambda Layer so the main function package stayed small and easier to update.</li><li><strong>Least-privilege IAM</strong>: Attached an execution role with only the required permissions (CloudWatch Logs, Bedrock, S3).</li><li><strong>Structured logging and error handling</strong>: Standardized error responses and added proper logging to simplify debugging and monitoring</li><li><strong>Local testing with SAM</strong>: Used sam local invoke and sam local start-api to test and debug before deployment, saving time and avoiding unnecessary redeploys.</li></ul><p>By the end of this process, I had a working Lambda function that ingests job postings, analyzes them with Bedrock, and returns structured results. The setup is clean, tested, and deployed with best practices, showing how Lambda makes it easy to focus on code while AWS manages the rest.</p><h3>Wrapping up</h3><p>With this, we’ve explored AWS Lambda from its fundamentals to a working example inside JobTrackr. We looked at its history, core concepts, use cases, pros and cons, best practices, and finally built and deployed a function with AWS SAM.</p><p>The key takeaway is simple: Lambda lets you focus on writing code while AWS manages the scaling and infrastructure behind the scenes. When you design with best practices in mind, your functions stay efficient, secure, and production-ready.</p><p>This Lambda function is now the entry point of JobTrackr. In the next part, we’ll connect it with DynamoDB so job postings aren’t just analyzed, but also stored for later search and insights. That’s when the system starts looking like a real serverless backend.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd"><strong>Learning AWS the Practical Way Series</strong></a>→ This post is part of my ongoing series. You can start from the beginning here to follow along as we explore the broader serverless ecosystem.</p><p><a href="https://github.com/anpise/JobTrackr"><strong>GitHub</strong></a> → You can find the template.yaml and supporting code from this demo on my GitHub.</p><p>Have you tried AWS Lambda before? What’s your favorite (or most challenging) use case? Share in the comments, I’d love to hear and compare experiences.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edccc4d944d6" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6">Learning AWS the Practical Way 
Part 1: AWS Lambda Deep Dive</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning AWS the Practical Way: Deploy, Debug, Deliver]]></title>
            <link>https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b8d946d90fd</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Mon, 29 Sep 2025 12:01:57 GMT</pubDate>
            <atom:updated>2025-10-28T14:54:47.573Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*DdngkmgvCPz1i7N4FBcGhQ.png" /></figure><p>I recently passed the <strong>AWS Developer Associate</strong> and <strong>AWS AI Practitioner</strong> certifications. Exams alone don’t prove much. The certifications gave me confidence, but their real value comes from building with AWS and applying it in real projects.</p><p>I am currently a Master’s student in Computer Science. Previously, I worked for two years as a Software Engineer and was first introduced to AWS during that time. I gained hands-on experience by setting up environments, developing applications, and troubleshooting real projects. That experience inspired me to pursue AWS certifications, since I already understood the basics and wanted to validate and deepen my skills. Preparing for the exams pushed me to study both theory and work hands-on with AWS core services. This helped me build a much clearer understanding of how to apply them in practice.</p><p>This series, <strong>Learning AWS the Practical Way: Deploy, Debug, Deliver</strong>, is meant to share practical lessons that show how AWS services fit together while building a simple application step by step. Each post will focus on one service, explaining the console options that matter, and demonstrating how it integrates into the system. The goal is to give readers a practical sense of how these services work together beyond theory.</p><p>The series is for anyone preparing for certifications, learning cloud development, or simply curious about how AWS services connect in practice. I hope you enjoy following along and gain some useful knowledge from reading it.</p><h4>The Application and the Roadmap</h4><p>To make this series concrete, we’ll build a simple application step by step and use it as a way to explore AWS services in action. The app will be a lightweight job-tracking tool that captures job postings and displays them on a simple dashboard. The focus is on clarity and learning, showing how AWS services connect and work together.</p><p>Here’s the rough flow of the series:</p><ul><li><strong>AWS Lambda</strong>: act as the serverless backend, processing incoming job URLs and running a Python script to extract details.</li><li><strong>DynamoDB</strong>: serve as NoSQL storage to keep job information in a scalable, serverless database.</li><li><strong>Amazon S3</strong>: host a simple single-page app (SPA) to display the stored jobs on a dashboard.</li><li><strong>Amazon Cognito</strong>: provide JWT-based authentication with basic username/password login.</li><li><strong>Amazon API Gateway</strong>: connect the frontend, backend, and database through secure endpoints.</li><li><strong>Amazon CloudWatch</strong>: monitor logs, metrics, and alarms to ensure everything runs smoothly.</li></ul><p>We will also explore end-to-end deployment with Infrastructure as Code, using tools like AWS SAM (Serverless Application Model) to define and launch the stack in a repeatable way.</p><h4>High-Level Architecture</h4><p>Here’s the architecture of the application we’ll build in this series using AWS services:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NdU84lOxzv7DLAfEhKU9SA.png" /><figcaption>JobTrackr Architecture Diagram</figcaption></figure><p>The flow starts with a user accessing the dashboard hosted on <strong>Amazon S3</strong>. The Single Page Application calls <strong>Amazon API Gateway</strong> (e.g., GET /jobs), which routes requests to <strong>AWS Lambda</strong>. Lambda retrieves and stores job data in <strong>Amazon DynamoDB</strong> and, for ingestion, uses <strong>Firecrawl</strong> and <strong>Amazon Bedrock</strong> for web scraping and analysis. The <strong>Chrome Extension</strong> sends job URLs to POST /ingest through API Gateway, secured with <strong>Amazon Cognito</strong> (JWT). <strong>Amazon CloudWatch</strong> collects logs, metrics, and alarms across the services for monitoring.</p><h3>What’s Next?</h3><p>This is just the beginning. From here, we’ll break down each AWS service step by step, exploring how it works, what options matter in the console, and how it connects into our simple application.</p><p>Here’s the plan for the series:</p><p><a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-1-aws-lambda-deep-dive-edccc4d944d6"><strong>Part 1 — AWS Lambda</strong></a><br>Building the backend function to process job URLs and set the foundation for the system.</p><p><a href="https://medium.com/@adityapise.0711/learning-the-aws-the-practical-way-part-2-amazon-dyanmodb-deep-dive-9f88aa4e5f1c"><strong>Part 2 — Amazon DynamoDB</strong></a><br>Storing job details in a serverless NoSQL database.</p><p><a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-3-building-secure-apis-with-amazon-api-gateway-and-amazon-e6c7913f0425"><strong>Part 3 — Amazon Cognito + API Gateway</strong></a><br>Securing APIs with JWT authentication and connecting frontend to backend.</p><p><a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-part-4-hosting-app-with-amazon-s3-and-cloudfront-475f822ee050"><strong>Part 4 — Amazon S3 (and CloudFront)</strong></a><br>Hosting the Single Page Application and delivering it to users.</p><p><a href="https://medium.com/aws-in-plain-english/learning-aws-the-practical-way-part-5-monitoring-and-observability-with-amazon-cloudwatch-48431eb6035c"><strong>Part 5 — Amazon CloudWatch</strong></a><br>Monitoring logs, metrics, and alarms across the system.</p><p><a href="https://medium.com/@adityapise.0711/learning-aws-the-practical-way-building-a-complete-serverless-application-22b3aab78b5d"><strong>Part 6— Wrap-Up &amp; Lessons Learned</strong></a><br>Reviewing the full system and key takeaways from building it step by step.</p><p>Stay tuned — Part 1 on AWS Lambda drops next, where we’ll build the backend function that processes job URLs 🚀.</p><p>If you found this useful, please leave a clap, share it with your peers, and follow me here for the next chapters in this AWS journey.</p><p>Here you can check out and celebrate my certifications:</p><ul><li><a href="https://www.credly.com/badges/be3ac473-bf89-48bd-9d79-c7072b55d3df/public_url">AWS Certified Developer — Associate</a></li><li><a href="https://www.credly.com/badges/6a455761-6178-463f-9e4b-eda74f258c77/public_url">AWS Certified AI Practitioner</a></li></ul><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p><em>Note: AI tools were used to assist with structuring and drafting this article.</em></p><p>#AWS #CloudComputing #Serverless #DynamoDB #Lambda #Cognito #API #CloudWatch #SAM #LearnAWS #AWSSeries</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b8d946d90fd" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/learning-aws-the-practical-way-deploy-debug-deliver-3b8d946d90fd">Learning AWS the Practical Way: Deploy, Debug, Deliver</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 3 — Advanced Git Internals and Best Practices]]></title>
            <link>https://medium.com/@adityapise.0711/part-3-advanced-git-internals-and-best-practices-fefb747c0e1e?source=rss-b28cf753e8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/fefb747c0e1e</guid>
            <category><![CDATA[git-best-practices]]></category>
            <category><![CDATA[beginner-guide]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[git-internals]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Aditya Pise]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 04:22:39 GMT</pubDate>
            <atom:updated>2025-10-01T11:44:51.579Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 3 — Advanced Git Internals and Best Practices</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P-1AJxIJu7W5a4Ka" /></figure><p>Welcome back to the Git series. In the previous parts, we explored what Git is, how it manages data using snapshots and hashes, and how to use essential commands to build a solid daily workflow. We also looked at collaboration techniques and remote workflows to help you work effectively in teams. If you haven’t read <a href="https://medium.com/@adityapise.0711/part-1-mastering-git-what-why-and-how-it-works-a77d2b7cd902">Part 1</a> or <a href="https://medium.com/@adityapise.0711/part-2-understanding-git-commands-deeply-dc4af672926e">Part 2</a> yet, I recommend checking those out first.</p><p>In this third and final part, we’re going beyond the commands. This time, we’ll dig into how Git actually works at a low level. By understanding how Git stores your data, how the .git folder is organized, and how to manage history with more control, you&#39;ll be better equipped to debug, collaborate, and use Git with confidence.</p><p>This part focuses less on memorizing commands and more on understanding the <em>why</em> behind them, something that can make all the difference when working on real-world projects or collaborating in teams.</p><p>Here’s what we’ll cover:</p><ul><li><strong>What Really Happens Inside the </strong><strong>.git Folder</strong></li><li><strong>Handling Complex Histories with Confidence</strong></li><li><strong>Daily Git Practices That Scale with You</strong></li></ul><p>Let’s get started.</p><h3>What Really Happens Inside the .git Folder</h3><p>When you run git init, Git quietly creates a .git folder inside your project directory. At first glance, this folder may not look like much. But it’s actually the core of your repository. It holds all your commits, branches, references, configuration, and everything Git needs to track your project.</p><p>Understanding what lives inside this folder is the first step toward truly mastering Git.</p><h4>The Structure of .git/</h4><p>A typical .git directory looks like this</p><pre>.git/<br>├── HEAD<br>├── config<br>├── index<br>├── objects/<br>├── refs/<br>│   ├── heads/<br>│   └── tags/<br>├── logs/<br>└── hooks/</pre><p>Here’s what each part does -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*ch2vh41RGsNx227DZj0lWg.png" /><figcaption>Internal Structure of .git folder</figcaption></figure><h4>Git’s Object Model</h4><p>Git stores everything as objects. Each object is identified by a SHA-1 hash. The three essential object types are:</p><p><strong>Blob : </strong>Stores the contents of a file. It doesn’t include the filename or directory structure.</p><p><strong>Tree : </strong>Represents a directory. Maps filenames to blob objects or other tree objects.</p><p><strong>Commit : </strong>Points to a tree and holds metadata like author, commit message, and parent references.</p><p>All these objects are saved inside the objects/ directory. The first two characters of the hash form a folder, and the remaining characters form the filename.</p><h4>Exploring Git Internals</h4><p>Use the following command to view the contents of the latest commit object</p><pre>git cat-file -p HEAD  # Displays the metadata and tree reference of the current commi</pre><p>From the output, copy the tree hash shown in the line starting with tree. Then inspect the directory structure at that point in histor</p><pre>git cat-file -p &lt;tree_hash&gt;  # Lists files and their corresponding blob (or sub-tree) hashes</pre><p>Next, choose any blob hash (representing a file) and view its contents</p><pre>git cat-file -p &lt;blob_hash&gt;  # Shows the actual contents of the file stored in Git</pre><p>This sequence allows you to manually trace how Git links commits to trees and trees to blobs. A commit captures a snapshot of the project by pointing to a tree. The tree maps filenames to their content blobs. The blob contains the raw file data. Understanding this chain helps demystify how Git reconstructs your entire project from its internal object database.</p><h3>Handling Complex Histories with Confidence</h3><p>Once you understand how Git stores data internally, it becomes easier to work with and reshape history when needed. Git provides tools that let you manage messy commit sequences, resolve conflicts effectively, and keep your project history clean and readable.</p><p>This section walks through practical techniques for rewriting, reorganizing, and resolving history in a way that aligns with both solo and team workflows.</p><h4>Rebase vs Merge</h4><p>Both rebase and merge are used to integrate changes from one branch into another, but they do so differently.</p><ul><li><strong>Merge</strong> preserves the original history by creating a new commit that joins the two branches.</li><li><strong>Rebase</strong> rewrites the commit history by placing your changes on top of another base.</li></ul><p>Example of a merge</p><pre>git checkout main              # Switch to the target branch<br>git merge feature-branch       # Merge feature-branch into main (creates a merge commit)</pre><p>This will produce a new merge commit that combines both histories.</p><p>Example of a rebase</p><pre>git checkout feature-branch    # Switch to the feature branch<br>git rebase main                # Replay feature-branch commits on top of main</pre><p>This rewrites the commits on feature-branch to follow main, resulting in a linear history.</p><p>Use rebase when you want a cleaner, linear history. Use merge when you want to preserve the context of parallel development.</p><h4>Interactive Rebase</h4><p>If your branch has several commits and you want to edit, reorder, squash, or remove some of them, use</p><pre>git rebase -i HEAD~n           # Opens the last n commits for editing (e.g., HEAD~3)</pre><p>This opens a text editor where you can choose actions for each commit</p><ul><li>pick keeps the commit as-is</li><li>reword allows changing the commit message</li><li>squash combines it with the previous commit</li><li>drop removes it</li></ul><p>This is especially useful before pushing to shared repositories, ensuring your changes tell a clean and focused story.</p><h4>Conflict Resolution</h4><p>During rebase or merge, conflicts may occur when the same lines are edited differently across branches. Git will pause and mark the files with conflict markers like this.</p><pre>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD<br>Current branch change<br>=======<br>Incoming branch change<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; feature-branch</pre><p>Edit the file to resolve the conflict, then stage the fix</p><pre>git add filename                # Mark conflict as resolved</pre><p>Continue the operation</p><pre>git rebase --continue          # Continue rebasing after resolving conflicts<br># or<br>git merge --continue           # If you were merging</pre><p>If you’re stuck or made a mistake, you can always abort</p><pre>git rebase --abort             # Abort the rebase and return to the original state</pre><p>Resolving conflicts well is not just about fixing code, but also about understanding why a conflict occurred and whether the result makes logical sense in context.</p><h3>Git Best Practices for Daily Development</h3><p>Understanding how Git works is powerful, but consistent habits are what make that knowledge practical. These best practices help keep your history clean, your collaboration smooth, and your workflow efficient.</p><h4>Write Clear, Meaningful Commit Messages</h4><p>A good commit message explains <em>what</em> changed and <em>why.</em></p><pre>git commit -m &quot;Fix signup form validation for empty email field&quot;</pre><p>Avoid vague messages like “update” or “fix bugs” — make it easy for others (and your future self) to understand the context.</p><h4>Commit Often, But with Focus</h4><p>Break your work into logical units and commit related changes together. Don’t mix unrelated fixes in a single commit.</p><pre># Good<br>git commit -m &quot;Refactor login API to reduce duplication&quot;<br># Avoid bundling unrelated changes like UI tweaks + database config in one commit</pre><p>If you forgot to add something small right after your last commit, you can update it without creating a new one.</p><pre>git add missing_file.py<br>git commit --amend     # Updates the last commit with the new changes</pre><p>This is useful for fixing typos, adding missing files, or improving commit messages. But don’t amend commits that have already been pushed to a shared branch — it rewrites history and can confuse collaborators.</p><h4>Keep Your Branches Short-Lived</h4><p>Use feature branches for new work, and merge them back into the main branch regularly. This avoids large, difficult merges later on.</p><pre>git checkout -b add-search-bar<br># Work, commit, test<br>git checkout main<br>git merge add-search-bar</pre><h4>Use .gitignore Properly</h4><p>Prevent unnecessary files from being committed, like build artifacts, logs, or personal settings.</p><pre># Example entries in .gitignore<br>*.log<br>node_modules/<br>.env</pre><h4>Use Staging Thoughtfully</h4><p>The staging area lets you control exactly what goes into a commit. Use it intentionally to commit only what you’ve reviewed and approved.</p><p>Avoid using broad commands like:</p><pre>git add .        # Adds all changes, including accidental ones<br>git add --all    # Stages every modified, new, or deleted file</pre><p>These commands often include unrelated or unintended changes — like config edits, temporary debug files, or forgotten log outputs.</p><p>Instead, prefer more deliberate commands:</p><pre>git add filename        # Stage only what you need<br>git add -p file.py      # Interactively choose specific hunks to stage</pre><p>This lets you group related changes together, split unrelated ones into separate commits, and keep your commit history clean and purposeful.</p><p>Being thoughtful at the staging step prevents messy diffs, noisy commits, and potential mistakes from slipping into version control.</p><h4>Stay Updated with Daily Pulls</h4><p>Before starting your day or beginning new work, make it a habit to sync with the latest changes from your main branch.</p><pre>git pull origin main  # Fetch and merge the latest changes from the remote main branch</pre><p>This helps you avoid large merge conflicts later and keeps your local environment aligned with the team’s work. If you’re working on a feature branch, it’s good practice to rebase or merge main regularly to stay current.</p><h4>Use Stash to Pause and Resume Work</h4><p>If you’re in the middle of something and need to switch tasks or pull changes, but your working directory isn’t clean, you can temporarily store your uncommitted changes with stash.</p><pre>git stash                # Saves all changes and restores a clean working directory<br>git pull origin main     # Safely update your branch without losing your work<br>git stash pop            # Reapplies the saved changes on top of the updated branch</pre><p>This workflow helps you avoid unnecessary commits, protects unfinished work, and makes sure you’re building on the latest base without conflict.</p><h4>Review Before You Push</h4><p>Check your diff before pushing to avoid mistakes.</p><pre>git diff                # See what’s changed<br>git diff --cached       # See what’s staged for commit</pre><p>These habits keep your Git history organized, your teammates happy, and your future debugging sessions less painful. You don’t need to use every feature of Git, but using the right ones with care makes a big difference.</p><h3>Wrapping Up the Git Series</h3><p>Git can feel confusing at times, especially when something breaks or behaves unexpectedly. But once you move beyond memorizing commands and start understanding how Git thinks, it becomes a tool you can trust and control.</p><p>Here’s a quick recap of what we covered in this series</p><p><strong>Part 1 — Mastering Git: What, Why, and How It Works</strong><br>Introduced Git’s core concepts, how it tracks changes using snapshots, and covered essential commands like add, commit, and status.</p><p><strong>Part 2 — Understanding Git Commands Deeply</strong><br>Explored practical workflows, branching, rewriting history, and how Git processes these operations internally.</p><p><strong>Part 3 — Advanced Git Internals and Best Practices</strong><br>Dived into how Git stores data at a low level, how to manage complex histories using tools like rebase and merge, and how to apply daily best practices for clean commits, safe collaboration, and consistent workflows.</p><p>If you’ve followed along, you now understand not just how to use Git, but how it works underneath. That makes all the difference when you’re building and maintaining real-world software.</p><p>Thanks for reading. If this series helped you, consider sharing it with someone else who might benefit from a deeper, clearer view of Git.</p><p>If you found this helpful, please <strong>leave a clap</strong>, share it with your peers, and follow for the final part in this Git journey.</p><p>Let’s connect:<br><a href="https://medium.com/@adityapise.0711">My Medium Profile<br></a><a href="https://www.linkedin.com/in/adityapise">My LinkedIn</a></p><p>Note: AI tools were used to assist with structuring, visuals, and drafting this article.</p><p><strong>#Git #VersionControl #GitTutorial #SoftwareDevelopment #GitInternals #DevTools #LearnGit #GitBasics #GitSeries</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fefb747c0e1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>