<?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 NILAJ_ 0914 on Medium]]></title>
        <description><![CDATA[Stories by NILAJ_ 0914 on Medium]]></description>
        <link>https://medium.com/@nilaj.majumder0814?source=rss-c13b87b08fe1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*V53gFPggzJx3OVz9</url>
            <title>Stories by NILAJ_ 0914 on Medium</title>
            <link>https://medium.com/@nilaj.majumder0814?source=rss-c13b87b08fe1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:06:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nilaj.majumder0814/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[Building a Scalable Serverless Contact Form Handler with AWS and Terraform: A Deep Dive]]></title>
            <link>https://medium.com/@nilaj.majumder0814/building-a-scalable-serverless-contact-form-handler-with-aws-and-terraform-a-deep-dive-fb16a14a626f?source=rss-c13b87b08fe1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb16a14a626f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-project]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[NILAJ_ 0914]]></dc:creator>
            <pubDate>Fri, 10 Oct 2025 08:11:48 GMT</pubDate>
            <atom:updated>2025-10-12T17:35:17.374Z</atom:updated>
            <content:encoded><![CDATA[<p>Handling contact form submissions is a fundamental requirement for many businesses. While it seems simple, building a solution that is secure, scalable, and cost-effective can be complex. In this article, we’ll break down the architecture and code of <strong>TravelEase</strong>, a complete, serverless web application designed to manage travel inquiries efficiently.</p><p>This project goes beyond a simple “sendmail” script. It’s a reliable and scalable solution built on AWS, featuring a modern Next.js frontend, a robust Python backend, and fully automated infrastructure deployment using Terraform.</p><h3>The Business Need: More Than Just an Email</h3><p>The architecture for TravelEase was driven by four key business requirements for their travel inquiry form:</p><ol><li><strong>Instant Customer Confirmation:</strong> Customers must receive a well-formatted confirmation email immediately after a successful submission.</li><li><strong>Detailed Business Notifications:</strong> The travel agency needs to receive a comprehensive email with all the inquiry details for prompt follow-up.</li><li><strong>Unified Tracking:</strong> A unique enquiry reference number must be generated and shared with both the customer and the business to streamline customer support.</li><li><strong>Data Integrity:</strong> The form must have robust validation on both the client and server sides to prevent errors and spam.</li></ol><h3>Architecture: A Serverless Approach to the Problem</h3><p>The application is built on a decoupled, event-driven architecture where each service has a specific job. This serverless approach means no servers to manage, automatic scaling, and paying only for what you use.</p><p>Here’s a look at the high-level architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vmRap5riYubI3B9U_Na6hg.png" /><figcaption>Contact Form Handler architecture</figcaption></figure><p>The key AWS services working together are:</p><ul><li><strong>Amazon S3 &amp; CloudFront:</strong> Host and deliver the static Next.js website globally with low latency and security.</li><li><strong>Amazon API Gateway:</strong> Acts as the secure front door (API endpoint) for our backend.</li><li><strong>AWS Lambda:</strong> Runs our backend logic (written in Python) without needing a dedicated server.</li><li><strong>Amazon DynamoDB:</strong> A highly scalable NoSQL database for securely storing every form submission.</li><li><strong>Amazon Simple Email Service (SES):</strong> Sends transactional emails to the customer and the business.</li><li><strong>AWS IAM &amp; Secrets Manager:</strong> Manage permissions and securely handle sensitive data like email addresses.</li></ul><h3>The Information Flow: From User Click to Confirmation Email</h3><p>Let’s trace the journey of a single form submission, from the user’s browser to the final confirmation.</p><h4>Step 1: Landing on the Website (User → CloudFront → S3)</h4><p>A user navigates to the TravelEase website. The request hits <strong>Amazon CloudFront</strong>, our Content Delivery Network (CDN). CloudFront serves the pre-built, static Next.js website files, which are stored securely in an <strong>Amazon S3 bucket</strong>. This ensures the website loads quickly and reliably for users anywhere in the world.</p><h4>Step 2: Filling and Submitting the Form (Client-Side Validation)</h4><p>The user fills out the “Contact Us” form. As they do, the Next.js frontend, specifically the code in Frontend/pages/contact.js, performs initial client-side validation. This is our first line of defense against bad data.</p><pre>// Inside Frontend/pages/contact.js<br>// 1. Required fields validation<br>if (!formData.name || !formData.email || !formData.destination || !formData.startDate) {<br>  setStatus({ submitting: false, submitted: false, error: &#39;Please fill out all required fields.&#39; });<br>  return;<br>}<br>// 2. Email format validation<br>if (!/^\S+@\S+\.\S+$/.test(formData.email)) {<br>  setStatus({ submitting: false, submitted: false, error: &#39;Please enter a valid email address.&#39; });<br>  return;<br>}<br>// ... more validations for dates, phone number, etc.</pre><p>Once validation passes, the browser sends a POST request with the form data to our backend API in the form of a JSON payload.</p><h4>Step 3: Entering the Backend (API Gateway)</h4><p>The request doesn’t go directly to our logic. It first hits the <strong>Amazon API Gateway</strong> endpoint. As defined in Infrastruture/api-gateway.tfThe API Gateway is configured to:</p><ol><li>Handle CORS (Cross-Origin Resource Sharing) preflight requests, a browser security measure.</li><li>Listen for POST requests on the /submit path.</li><li>Securely trigger our AWS Lambda function.</li></ol><p>This acts as a managed, scalable, and secure entry point, protecting our backend logic from direct exposure to the internet.</p><h4>Step 4: The Core Logic (AWS Lambda)</h4><p>This is where the magic happens. The API Gateway invokes our Python Lambda function, defined in Lambda/lambda_function.py, and passes the form data to it. The function then performs a series of critical tasks:</p><ol><li><strong>Server-Side Re-validation:</strong> It re-validates <em>all</em> incoming data. This is crucial for security, as client-side validation can be bypassed.</li><li><strong>Destination Check:</strong> It makes an external API call to the free OpenStreetMap Nominatim service to verify that the user-provided destination is a real place.</li><li><strong>Data Persistence:</strong> It generates a unique submissionId using Python&#39;s uuid library, adds timestamps, and stores the complete record in the <strong>Amazon DynamoDB</strong> table. The table schema, defined in Infrastruture/dynamodb.tf, uses this submissionId as its primary key.</li><li><strong>Email Notifications:</strong> Using the boto3 AWS SDK, the function uses <strong>Amazon SES</strong> to craft and send two separate emails: A confirmation summary to the customer, including the submissionIdand a detailed notification with the full form data to the business.</li><li><strong>Success Response:</strong> The function returns a statusCode: 200 JSON response to the API Gateway.</li></ol><p>Here’s a snippet from the Lambda function showing the data being saved to DynamoDB:</p><pre># Inside Lambda/lambda_function.py<br># ... after validation ...<br>#prepare data for dynamodb table<br>submission_id = str(uuid.uuid4())<br>utc_time = datetime.now(timezone.utc)<br>submission_timestamp = utc_time.isoformat()<br>table = dynamodb.Table(Table_Name)<br>items_to_store = {<br>    &#39;submissionId&#39;: submission_id,<br>    &#39;createdAt&#39;: submission_timestamp,<br>    **form_data<br>}<br>#Save items to DynamoDB table<br>table.put_item(Item=items_to_store)</pre><h4>Step 5: Closing the Loop (User Confirmation)</h4><p>The successful response from Lambda travels back through API Gateway to the user’s browser. The frontend JavaScript in contact.js receives this success signal and updates the UI to display a &quot;Thank You&quot; message, completing the journey.</p><h3>Infrastructure as Code: The Terraform Advantage</h3><p>The entire AWS infrastructure for this project is defined as code using <strong>HashiCorp Terraform</strong>. The files in the Infrastruture/ directory describes every resource, from the S3 bucket to the Lambda function&#39;s IAM permissions (iam.tf) and environment variables (lambda.tf).</p><p>This approach provides several key benefits:</p><ul><li><strong>Automation:</strong> The entire stack can be created, updated, or destroyed with a few simple commands (terraform apply).</li><li><strong>Repeatability:</strong> You can deploy the exact same environment in different AWS regions or accounts with confidence.</li><li><strong>Version Control:</strong> The infrastructure is versioned in Git alongside the application code, providing a complete history of changes.</li></ul><h3>Conclusion</h3><p>The TravelEase Contact Form is a powerful demonstration of how modern serverless technologies can be combined to build solutions that are not only highly functional but also secure, infinitely scalable, and incredibly cost-effective. By leveraging Infrastructure as Code, the entire system is automated and easy to manage.</p><p>This architecture successfully meets all the initial business requirements, providing a seamless experience for the customer and a reliable, detailed notification system for the business.</p><p>You can find the complete source code for this project on <a href="https://github.com/Nilaj0914/TravelEase-Contact-Form">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb16a14a626f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Serverless Portfolio with Next.js, AWS Amplify, and CDK]]></title>
            <link>https://medium.com/@nilaj.majumder0814/building-a-serverless-portfolio-with-next-js-aws-amplify-and-cdk-29b60bb8ccf4?source=rss-c13b87b08fe1------2</link>
            <guid isPermaLink="false">https://medium.com/p/29b60bb8ccf4</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-project]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[NILAJ_ 0914]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 16:28:40 GMT</pubDate>
            <atom:updated>2025-09-15T16:28:40.187Z</atom:updated>
            <content:encoded><![CDATA[<h3>A deep dive into creating a modern, automated, and scalable portfolio website.</h3><p>Having built a handful of cloud projects, I wanted to build a modern, professional portfolio website to showcase my projects and skills. While popular website builders exist, building and deploying a cloud-native portfolio will itself demonstrate my cloud engineering capabilities. Additionally, I also wanted to implement CI/CD practices to make updates seamless and automated.</p><p><strong>Many cloud engineers face the challenge of effectively presenting their work. Their portfolios often suffer from:</strong></p><ul><li>Manual deployment processes that slow down updates</li><li>Limited ability to showcase real cloud projects</li><li>Basic hosting that doesn’t demonstrate cloud expertise</li><li>No way to automatically update when they add new projects</li><li>Static sites that don’t show full-stack capabilities</li></ul><p>This article breaks down the journey of creating a portfolio website using a powerful combination of <strong>Next.js</strong> for the frontend, <strong>AWS Amplify</strong> for hosting and deployment, and the <strong>AWS Cloud Development Kit (CDK)</strong> for defining the infrastructure as code.</p><p>While you’re reading about this project, feel free to visit my <a href="https://main.d1tf2qyfvibalf.amplifyapp.com/">website</a>. Right now, the website only provides links to my various blogposts on Medium and also provides links to the GitHub repos of my projects. I do have some improvements planned for a future update, but for now, check it out and let me know what you think. Feedback is greatly appreciated.</p><h3>What We’re Building</h3><p>At its core, this is a personal portfolio website with a few key features:</p><ul><li><strong>A sleek frontend</strong> to showcase projects and blog posts.</li><li><strong>Dynamic filtering</strong> that allows visitors to sort content by technical skills.</li><li><strong>A fully automated CI/CD pipeline</strong> that deploys changes to the website whenever new code is pushed to GitHub.</li></ul><p>Here’s a look at the high-level architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUB_36ZKtSLaNI5U3NcXkA.png" /><figcaption>Portfolio Website Architecture</figcaption></figure><p>Let’s dive into the two main components of this project: the frontend application and the backend infrastructure.</p><h3>The Frontend: A Modern Experience with Next.js</h3><p>The website_portfolio/website directory contains the Next.js application. Here’s a breakdown of the key frontend technologies and why they were chosen:</p><h4>Next.js: The Framework of Choice</h4><p>Next.js is a React framework that comes with a ton of features out-of-the-box, making it a great choice for this project. The most significant feature we’re leveraging is <strong>Static Site Generation (SSG)</strong>. In the next.config.mjs file, you&#39;ll find the line output: &#39;export&#39;. This tells Next.js to pre-render the entire website into static HTML, CSS, and JavaScript files during the build process.</p><p><strong>Why is this a big deal?</strong></p><ul><li><strong>Performance:</strong> Static files are incredibly fast to serve. There’s no server-side computation needed to display the page, so users get a lightning-fast experience.</li><li><strong>Scalability:</strong> Serving static files is easy to scale. They can be distributed across a global Content Delivery Network (CDN), meaning your website loads quickly for users anywhere in the world.</li><li><strong>Cost-Effectiveness:</strong> Hosting static files is generally cheaper than running a server 24/7.</li></ul><h4>UI and Styling: Shadcn/UI and Tailwind CSS</h4><p>To build the user interface, we’ve used <strong>shadcn/ui</strong>, a fantastic collection of accessible and reusable UI components. This is not a traditional component library but rather a set of components that you can copy and paste into your project, giving you full control over their code. This approach avoids dependency bloat and makes customization a breeze.</p><p>For styling, <strong>Tailwind CSS</strong> is the star of the show. It’s a utility-first CSS framework that allows for rapid UI development without ever leaving your HTML (or in this case, JSX). This makes for a highly efficient and maintainable styling workflow.</p><p><strong>NOTE: All of the website Frontend and UI were built using Vercel V0, and the components detailed above were used to achieve the target look and responsiveness of the website</strong></p><h3>The Backend: Serverless and Automated with AWS</h3><p>The true power of this project lies in its backend infrastructure, which is fully automated and managed as code. You’ll find the infrastructure code in the website_portfolio/website-infrastructure directory.</p><h4>AWS Cloud Development Kit (CDK): Infrastructure as Code</h4><p>Instead of manually clicking through the AWS console to set up our resources, we’ve defined everything in TypeScript using the <strong>AWS CDK</strong>. This is a game-changer for a few reasons:</p><ul><li><strong>Repeatability:</strong> You can deploy the exact same infrastructure in different AWS accounts or regions with a single command.</li><li><strong>Version Control:</strong> Your infrastructure is now part of your Git repository. You can track changes, review pull requests, and roll back to previous versions if something goes wrong.</li><li><strong>Developer-Friendly:</strong> You can use a familiar programming language like TypeScript to define your cloud resources, complete with features like autocompletion and type checking.</li></ul><h4>AWS Amplify: The Deployment Powerhouse</h4><p><strong>AWS Amplify</strong> is a set of tools and services that makes it easy to build and deploy full-stack applications on AWS. For this project, we’re using its hosting and CI/CD capabilities.</p><p>In the website-infrastructure-stack.ts file, you can see how we define our Amplify application:</p><ul><li><strong>GitHub Integration:</strong> We connect our Amplify app directly to our GitHub repository. This is done by providing the owner, repository name, and a GitHub token stored securely in AWS Secrets Manager.</li><li><strong>Automated Builds:</strong> The buildSpec section tells Amplify how to build our Next.js application. It’s a series of commands that are run every time a deployment is triggered. We install our dependencies, then run the build-and-export script to generate the static files.</li><li><strong>Continuous Deployment:</strong> The final piece of the puzzle is the autoBuild: true setting for the main branch. This tells Amplify to automatically kick off a new build and deployment whenever code is pushed to the main branch on GitHub. This is CI/CD in action!</li></ul><h3>Lessons Learned from Building This Project</h3><p>Every project is a learning experience, and this one was no exception. Here are some of the key takeaways:</p><ol><li><strong>The Power of Static:</strong> For content-heavy sites like portfolios and blogs, the performance benefits of static site generation are undeniable. Next.js makes this incredibly easy to set up.</li><li><strong>Infrastructure as Code is a Must:</strong> Using the AWS CDK to define the infrastructure was a huge win. It took a bit of upfront effort, but the ability to tear down and redeploy the entire stack with a single command is invaluable. It also makes the project much easier for others to replicate.</li><li><strong>Secrets Management is Crucial:</strong> Storing the GitHub token in AWS Secrets Manager instead of hardcoding it is a critical security practice. The CDK makes it easy to reference secrets securely in your infrastructure code.</li><li><strong>Embrace Serverless:</strong> AWS Amplify takes away all the pain of managing servers. It handles the build process, hosting, and even provides a global CDN. This serverless approach means less operational overhead and more time to focus on building great features.</li><li><strong>Start with a Good UI Foundation:</strong> Using Vercel V0 and a component library like shadcn/ui and a utility-first CSS framework like Tailwind CSS from the beginning saved a massive amount of time and resulted in a more consistent and professional-looking final product.</li></ol><h3>Get Started Yourself!</h3><p>This project is a great template for anyone looking to build their own modern, serverless portfolio. The combination of Next.js, AWS Amplify, and the CDK provides a powerful and flexible foundation to build upon.</p><p>You can find all the code and detailed setup instructions in the <a href="https://github.com/Nilaj0914/Amplify-Portfolio-website">GitHub Repository</a>. I encourage you to fork it, play around with it, and make it your own. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29b60bb8ccf4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TechHealth Migration: Modernizing a Healthcare Web App on AWS with the CDK]]></title>
            <link>https://medium.com/@nilaj.majumder0814/techhealth-migration-modernizing-a-healthcare-web-app-on-aws-with-the-cdk-15ef12c907d2?source=rss-c13b87b08fe1------2</link>
            <guid isPermaLink="false">https://medium.com/p/15ef12c907d2</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-project]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[NILAJ_ 0914]]></dc:creator>
            <pubDate>Sun, 31 Aug 2025 17:29:04 GMT</pubDate>
            <atom:updated>2025-08-31T17:29:04.344Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Note: This is a fictional case study for educational and portfolio purposes</em></p><h3><strong>Scenario</strong></h3><p>Five years ago, TechHealth Inc. launched its patient portal on AWS. Like many startups, they built their infrastructure the fastest way they knew how: manually, through the AWS Console. It worked, but as the company grew, the cracks began to show. Deployments were slow, inconsistencies between environments caused bugs, and the security posture was difficult to audit.</p><p>Major changes were required in order to fix these problems and also future-proof these systems, such that any new problem in the future does not require such overhauls.</p><p>Before we make any systemic changes to their infrastructure, it is required that we make their infrastructure fully automated and version-controlled so that we may deploy and destroy AWS resources consistently and repeatably. Being version-controlled also means that any changes made to the app are tracked, and rollbacks are easier in case something goes wrong. To make these changes, we decided to replicate their existing Web app infrastructure using AWS CDK and also enable version control of the project using GitHub. You can check out the entire project <a href="https://github.com/Nilaj0914/TechHealth-AWS-Migration">here</a>.</p><h3>Why Move from Clicks to Code? The Power of the AWS CDK</h3><p>The “click-ops” approach of manual configuration is a great way to start, but it doesn’t scale. Every change is a risk, and consistency is a constant battle. We chose Infrastructure as Code (IaC) to solve this, and specifically the AWS CDK with TypeScript, for a few key reasons:</p><ul><li><strong>Consistency is King:</strong> IaC guarantees that our development, staging, and production environments are identical, eliminating the classic “it works on my machine” problem.</li><li><strong>Version Control for Infrastructure:</strong> By defining our infrastructure in a Git repository, we get peer reviews, a full history of changes, and the ability to roll back if something goes wrong.</li><li><strong>Speed and Automation:</strong> What used to take hours of manual clicking now takes a single command: cdk deploy.</li></ul><p>The CDK, in particular, lets us use a familiar programming language like TypeScript to define our cloud resources with high-level, reusable components, making the whole process more efficient and less error-prone.</p><h3>Architecting our infrastructure for resiliency and security</h3><p>Our new architecture is built on a foundation of security and high availability. We broke the infrastructure into three modular stacks: a VPC for the network, an EC2 stack for the web servers, and an RDS stack for the database.</p><p>At the heart of our design is a custom Virtual Private Cloud (VPC) that spans two AWS Availability Zones (AZs). This means our application is distributed across at least two physical data centers, making it resilient to a single point of failure.</p><p>Within this VPC, we created two types of subnets:</p><ul><li><strong>Public Subnets:</strong> These are for our internet-facing resources, namely the Application Load Balancer (ALB) that distributes traffic and the EC2 web servers themselves.</li><li><strong>Isolated Subnets:</strong> This is where the magic happens for security. These subnets have no direct route to the Internet. We placed our RDS MySQL database here, ensuring that the sensitive patient data it holds is completely shielded from public access.</li></ul><p>This multi-AZ, multi-subnet design ensures that even if one data center goes down, our application remains available, with the ALB automatically redirecting traffic to the healthy instances and the RDS database failing over to its hot standby in the other AZ.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vbqZjYLlLmbFSygs1GVtcw.png" /><figcaption>Architecture Diagram</figcaption></figure><h3>A Deep Dive into Our Security-First Approach</h3><p>For a healthcare application, security isn’t just a feature; it’s a requirement. We layered our security controls to create a robust defense.</p><p><strong>1. Granular Firewall Rules with Security Groups:</strong> We treated our Security Groups like strict gatekeepers. The rules are simple but powerful:</p><ul><li>The ALB allows web traffic from anywhere on the internet.</li><li>The EC2 web servers <strong>only</strong> accept web traffic from the ALB. This prevents anyone from bypassing our load balancer.</li><li>The RDS database <strong>only</strong> accepts traffic from the EC2 web servers. This is our most critical rule, ensuring the database is completely locked down.</li></ul><p>For administrative access, we dynamically allow SSH access only from the IP address of the engineer performing the deployment, a neat trick that avoids hardcoding sensitive information.</p><p><strong>2. Eliminating Hardcoded Passwords with AWS Secrets Manager:</strong> Perhaps the biggest security win was getting rid of database passwords in our code. The CDK allows us to automatically:</p><ol><li>Generate a strong, random password for our database.</li><li>Store it securely in AWS Secrets Manager.</li><li>Grant our EC2 instances the specific IAM permissions needed to fetch that password at runtime.</li></ol><p>Credentials are now managed automatically, rotated easily, and never exposed to developers.</p><h3>Cost Considerations</h3><p>All of our architectural decisions influence our operating costs, and it is important for modern cloud architectures to be cost-efficient. For this, we took the following decisions:</p><ul><li><strong>No NAT Gateways:</strong> NAT Gateways are great for allowing private resources to access the internet, but they come with an hourly cost and data processing fees. Since our isolated database doesn’t need to make outbound calls, we configured our VPC with zero NAT Gateways, completely eliminating that cost.</li><li><strong>Understanding High Availability Costs:</strong> Running a Multi-AZ database isn’t free. AWS charges a small fee (around $0.01 per GB) for the data replicated between the primary and standby instances. We decided this was a necessary and worthwhile investment for the high availability and peace of mind it provides.</li></ul><p>For development, we also set the database’s removalPolicy to DESTROY. This means when we tear down the stack withcdk destroy, the database is deleted, preventing orphaned resources from running up a bill.</p><p><strong>NOTE: In production environments, it is recommended to change the removal policy to </strong><strong>RETAIN</strong></p><h3>Results:</h3><p>This project sets up a custom Virtual Private Cloud (VPC), deploys a fleet of EC2 instances behind an Application Load Balancer to serve the web application, and provisions a secure, multi-AZ RDS MySQL database for data persistence.</p><p>In accordance with our security-first approach, all of our resources are protected by our security groups at the instance level, and communication between our resources is also handled by the security groups, which follows AWS security best practices.</p><h3>Key Lessons and Our Path Forward</h3><p>This migration was more than just a technical exercise; it was a shift in mindset.</p><ul><li><strong>Security as Code is a Game-Changer:</strong> Defining security rules in code makes them visible, reviewable, and part of our standard development workflow.</li><li><strong>The CDK Simplifies Complexity:</strong> The CDK’s ability to manage dependencies between stacks and pass outputs from one to another (like the VPC ID) is a huge improvement over manual processes.</li></ul><p>The next steps are to implement an EC2 Auto Scaling Group for true elasticity, add an HTTPS listener to our ALB for end-to-end encryption, and build a full CI/CD pipeline to automate our deployments.</p><p>By moving from clicks to code, we’ve built a foundation for TechHealth that is secure, scalable, and ready for the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15ef12c907d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From chaos to control: Fixing a Startup’s AWS security debt]]></title>
            <link>https://medium.com/@nilaj.majumder0814/from-chaos-to-control-fixing-a-startups-aws-security-debt-5fd0dceb67a6?source=rss-c13b87b08fe1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fd0dceb67a6</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud-project]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[NILAJ_ 0914]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 08:16:22 GMT</pubDate>
            <atom:updated>2025-08-27T08:16:22.351Z</atom:updated>
            <content:encoded><![CDATA[<p>Note: This is a fictional case study-based project for educational and portfolio purposes.</p><h3>The Problem</h3><p>When a company is new, it’s common to focus on getting a product out quickly. This can lead to security taking a backseat. A frequent issue is when everyone in the company, from developers to finance, uses the main AWS root account for all their work. In doing so, the startup has neglected most, if not all, required security best practices, putting its company under serious security risks.</p><p>This article uses a fictional company, “StartupCo,” to show how to fix a problem that has become far too common in early-stage startups. After their product went live, their CTO now recognizes the security risks their negligence created. We’ll walk through how we improved their setup using AWS Identity and Access Management (IAM) and automated the whole process with CloudFormation.</p><p>You can find the CloudFormation template used in this project on <a href="https://github.com/Nilaj0914/StartupCO-IAM-Permission-Configuration">GitHub</a></p><h3>Initial Setup of StartupCo’s AWS account</h3><p>When we first examined StartupCo’s AWS account, we found they had EC2 servers, S3 buckets, and an RDS database with some monitoring added using CloudWatch. Even though their basic infrastructure had loads of inefficiencies(such as multiple production and development environments), the biggest possible threat to their operations was that access control to the company’s resources was nonexistent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JW7judj78Bs281IV0SAqA.png" /><figcaption>StartupCo’s Infrastructure setup</figcaption></figure><p>Here were the main problems:</p><ul><li><strong>Shared Root Account</strong>: All ten employees used the root account for their daily tasks. This is risky because the root account has permission to do anything, including deleting all resources.</li><li><strong>No Multi-Factor Authentication (MFA)</strong>: The root account was only protected by a password, making it easier to compromise.</li><li><strong>Insecure Password Sharing</strong>: The root password was shared in chats, which is not a secure practice.</li><li><strong>No Job/Role Permissions</strong>: Since everyone was an administrator, there was no control over who could access what. This meant a single mistake could have a huge impact on the entire system.</li></ul><h3>Fixing these problems: A three-step plan</h3><p>We proposed a solution to build a strong security foundation with a three-step plan</p><ol><li><strong>Secure the Root Account</strong>: The first step was to lock down the root user. This included enabling MFA, setting a strong password, and storing the password safely in AWS Secrets Manager. The root account should only be used for specific tasks that require it.</li><li><strong>Create Role-Based Access Control</strong>: We planned to create separate IAM user accounts for each employee. We would also create IAM Groups for different job roles like Developers, Operations, Finance, and Data Analysts.</li><li><strong>Apply the Principle of Least Privilege</strong>: Each group would get only the permissions needed for their specific job. This ensures that employees can only access the resources and perform the actions that are absolutely necessary for their work, no more, no less.</li></ol><h3>Using Code to Automate the Solution</h3><p>To make sure the setup was consistent and easy to manage, we defined the entire IAM configuration in a CloudFormation template. This avoids manual setup and makes the system easy to audit, and providing access to new employees is as simple as making their IAM user account and adding them to their user group according to their job role.</p><h3>Step 1: Securing the Root Account</h3><p>Before creating new users, we took these manual steps:</p><ul><li>Enabled a virtual MFA device on the root account.</li><li>Generated a new, complex password and stored it in AWS Secrets Manager.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*ZhFlJxVkU3Kc7rqvJHfTBA.png" /><figcaption>Root User Crededntials in AWS Secret Manager</figcaption></figure><ul><li>Set up a strong password policy for all new IAM users that is industry-compliant with established security frameworks such as CIS and NIST.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mcm8nuqORESMKdSpdNjEIQ.png" /><figcaption>New password policy for all IAM User accounts</figcaption></figure><h3>Step 2: Creating an Administrator User</h3><p>To avoid using the root user account for everyday tasks, the CloudFormation template creates a separate IAM user with “Administrator Access” policy. This user is meant for managing the AWS environment and has almost equivalent privileges to the root user account, reducing the need to use it for managerial purposes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*hsWU-u9TFPQ58Npkg02N-g.png" /><figcaption>Code snippet for the StartupCo Admin IAM user</figcaption></figure><h3>Step 3: Defining IAM User Groups with Job/Role Specific Permissions</h3><p>We defined IAM Groups in the template and attached AWS Managed Policies to them based on their roles. For example, the Developers Group was given access to manage applications on EC2 and S3 but was restricted to read-only access for logs and had no access to billing or the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*13RGs1Rwgqscp-as0ij6iQ.png" /><figcaption>Code snippet for the Developers IAM User group</figcaption></figure><p>This same approach was used for all other roles, like the Finance Group (read-only access to billing) and the Data Analysts Group (read-only access to S3 and RDS).</p><h3>Step 4: Creating Users and Assigning Them to Groups</h3><p>Finally, the template creates individual IAM users for every employee and adds them to their correct groups. This automatically gives them the right permissions. Each user is also required to change their password when they first log in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*rZhpoxhjFhREbddtGXnorw.png" /><figcaption>Code snippet for the IAM User account for James (developer)</figcaption></figure><h3>Final Result</h3><p>After implementing this solution, StartupCo’s security was significantly improved.</p><ul><li><strong>Smaller Attack Surface</strong>: The root account is now secure and used less often. If a developer’s account is compromised, the damage is limited to what that user can access.</li><li><strong>Principle of Least Privilege in Action</strong>: With specific permissions for each role, the risk of accidental or malicious damage is much lower.</li><li><strong>Easier to Scale and Audit</strong>: Adding a new employee is now as simple as adding them to the CloudFormation template. The entire permission setup is stored in code, making it easy to review.</li><li><strong>Better Compliance</strong>: The new password policy and MFA help the company meet standard security requirements.</li></ul><p>This project shows that good security is a key part of a solid foundation in the cloud. By using IAM best practices and Infrastructure as Code, any organization can create a more secure and manageable environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fd0dceb67a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Got my first cloud certification]]></title>
            <link>https://medium.com/@nilaj.majumder0814/got-my-first-cloud-certification-3939faad9a10?source=rss-c13b87b08fe1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3939faad9a10</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[NILAJ_ 0914]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 05:01:36 GMT</pubDate>
            <atom:updated>2025-08-18T05:01:36.153Z</atom:updated>
            <content:encoded><![CDATA[<p>So, for the past few weeks, I have been learning all about Cloud, Cloud Computing basics, its importance in the ever-evolving world of technology, and how AWS has played a key role in the evolution of this industry by making high-end computing services accessible to the masses. So I decided to solidify my knowledge further by getting certified.</p><p>I’m proud to announce that I have successfully gained my Certified Cloud Practitioner certification, which provided me with a bird’s-eye view of the cloud landscape and how AWS services are utilized in that landscape.</p><p>You can view my Credly Badge below:<br><a href="https://lnkd.in/dMMUi_7K">https://lnkd.in/dMMUi_7K</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3939faad9a10" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>