<?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 Uzeir Siddiqui on Medium]]></title>
        <description><![CDATA[Stories by Uzeir Siddiqui on Medium]]></description>
        <link>https://medium.com/@uzeir13?source=rss-1cce55f58086------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8tzTHJtjUezx5iS2TUVZBQ.png</url>
            <title>Stories by Uzeir Siddiqui on Medium</title>
            <link>https://medium.com/@uzeir13?source=rss-1cce55f58086------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:22:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@uzeir13/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[Deploying My First Big Cloud Project: A Next.js Website on AWS with Terraform]]></title>
            <link>https://medium.com/@uzeir13/deploying-my-first-big-cloud-project-a-next-js-website-on-aws-with-terraform-4b366a6b13d3?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b366a6b13d3</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[cloud-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 18:14:12 GMT</pubDate>
            <atom:updated>2025-02-10T18:14:12.715Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*WPy8z-6XCwDuG2amymD7lQ.png" /></figure><p><strong>Deploying My First Big Cloud Project: A Next.js Website on AWS with Terraform</strong></p><p>My first big cloud project was deploying a Next.js website on AWS using Infrastructure as Code (IaC) with Terraform. The site was stored on an S3 bucket and utilized CloudFront for global content delivery, ensuring it was fast-loading and publicly accessible. This project demonstrated key cloud principles: high availability, scalability, cost-effectiveness, and performance optimization.</p><p><strong>Project Breakdown</strong></p><p>S3 for Static Site Hosting — The website’s static files were stored in an S3 bucket, making it a serverless, cost-effective solution.</p><p>CloudFront for CDN — Using CloudFront significantly improved load times, reduced latency, and enhanced security by caching content closer to users.</p><p>Terraform for Infrastructure as Code — Defined all AWS resources in Terraform, enabling scalability, reproducibility, and automation.</p><p>Security &amp; Cost Optimization — Configured IAM policies, enabled CloudFront caching, and used Terraform state management to track infrastructure changes efficiently.</p><p>I started by downloading a Next.js boilerplate to host on my S3 bucket. Once the project was set up, I built the application to generate the static files required for deployment. These files would serve as the foundation of the website, ensuring that the content could be efficiently distributed.</p><p>Next, I created an S3 bucket using Terraform, allowing me to define and manage the infrastructure as code. To ensure proper security and accessibility, I configured ownership controls, public access settings, and access control lists (ACLs). These settings ensured that the bucket was secure by default while still allowing public read access for the static site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l2M1slI7luyZRkncFPKzwQ.png" /><figcaption>Terraform state file</figcaption></figure><p>I started with creating the Terraform state file to configure my S3 bucket and DynamoDB table. The S3 bucket was used to store the Terraform state remotely, ensuring that my infrastructure changes were tracked consistently. To add a layer of security and prevent conflicts in a team environment, I integrated DynamoDB for state locking, which helped prevent multiple processes from making simultaneous changes to the infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VCr4KldXCqoy8xtt61bLgQ.png" /><figcaption>Sample of code, you can view the full code on my GitHub</figcaption></figure><p>In my main.tf file, I wrote the code to configure Terraform for AWS, ensuring that my deployment was automated and reproducible. I defined the S3 bucket for hosting my static site and implemented ownership controls to manage access permissions effectively. To make the website publicly accessible, I configured the necessary public access settings and ACLs, allowing users to access the site seamlessly.</p><p>The bucket policy, ownership controls, and network ACLs serve as additional layers of security to protect the S3 bucket and its contents. The bucket policy defines explicit permissions, restricting or allowing access based on specific conditions, ensuring that only authorized requests are processed. Ownership controls help enforce access restrictions by managing who has control over objects within the bucket. Meanwhile, network ACLs provide a way to regulate traffic at the subnet level, adding another safeguard against unauthorized access. Together, these security measures help maintain the integrity, confidentiality, and availability of the static site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ic126EqwUacsl2WLSVIKWw.png" /></figure><p>Next, I set up CloudFront to use the S3 bucket as the origin, enabling content delivery network (CDN) capabilitiesfor my static site. By integrating CloudFront, I ensured that website content was cached at edge locations worldwide, significantly improving load times and reducing latency for users across different regions. With CloudFront handling requests efficiently, my site became more scalable, resilient, and cost-effective.</p><p>Once my project was ready to deploy, I ran terraform init to initialize the Terraform configuration, setting up the backend and downloading the required providers. Then, I proceeded with terraform apply to provision the infrastructure. However, during the deployment, I encountered some errors that prevented the resources from being created. After reviewing the logs, I realized that the issues were minor syntax errors in my Terraform code. By carefully debugging and correcting these mistakes, I was able to redeploy successfully, ensuring that my infrastructure was properly set up without further complications. I then ran terraform show to display the details of my deployed infrastructure, including the CloudFront distribution URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bHAU2v3JMhoOfxCtWbMA8Q.png" /></figure><p>Lastly, I needed to deploy my Next.js folder to the S3 bucket. To do this, I ran the aws s3 sync command, which allowed me to efficiently transfer the static files from my local build to the bucket. Once the files were uploaded, I could use the CloudFront URL to access the site. This setup ensured that CloudFront was serving the static assets from the S3 bucket, delivering a fast, reliable, and scalable experience for users across the globe. With everything in place, I successfully ran my Next.js site on CloudFront, achieving a fully deployed, high-performance web application.</p><p>This was a fun and challenging project. I learned how to host a static site on S3, and I gained valuable experience with Infrastructure as Code (IaC) using Terraform. Although I know my site won’t be viewed by millions, the process of setting up CloudFront and optimizing the site for global delivery gave me great exposure to CDN technologies. This hands-on experience enhanced my understanding of cloud infrastructure, automation, and scalability, and I’m excited to apply these skills to future projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b366a6b13d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Python: A Cloud Engineer’s Guide to Automation and Infrastructure]]></title>
            <link>https://medium.com/@uzeir13/learning-python-a-cloud-engineers-guide-to-automation-and-infrastructure-e2f5059fb545?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2f5059fb545</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 23:53:16 GMT</pubDate>
            <atom:updated>2025-02-05T23:53:16.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*8ct2A3WTRhrgiZXtMwZKNQ.png" /></figure><p><strong>Learning Python for Cloud Engineering: A Journey into Automation and Infrastructure</strong></p><p>Python is one of the most versatile and widely-used programming languages, and it has become an essential skill for anyone pursuing a career in cloud engineering. Known for its simplicity, readability, and power, Python enables professionals to automate repetitive tasks, manage infrastructure as code, and work with cloud services such as AWS, Azure, and Google Cloud. Its straightforward syntax makes it easy for beginners to learn, while its extensive libraries and frameworks offer endless possibilities for more advanced users.</p><p>As a cloud engineering enthusiast, I began my journey with Python to gain deeper insights into automation, infrastructure management, and cloud security. Learning Python is an important step because it complements the skills needed for managing cloud resources, handling deployments, and automating workflows. In this post, I’ll share the key concepts I’ve learned and how they can be applied to cloud engineering.</p><h3>The Basics: Getting Started with Python</h3><p><strong>Comments:</strong><br>One of the first concepts I grasped in Python was how to write comments. Comments are essential for making code more understandable, not just for others, but also for future revisions. They help explain the purpose behind specific code blocks and make it easier to maintain code over time. In Python, comments are written using the # symbol, and multi-line comments are enclosed in triple quotes.</p><p><strong>Control Structures:</strong><br>Control structures like if, else, and elif provide the foundation for decision-making in programming. I learned how to use these to create conditional logic in Python. This is especially useful in cloud engineering for tasks like monitoring and alerting systems, where I can create scripts that only execute certain actions if specific conditions are met.</p><h3>Diving Deeper: Core Concepts of Python</h3><p><strong>Dictionaries:</strong><br>Dictionaries are an essential data structure in Python. I quickly learned how to use them to store key-value pairs, which are perfect for organizing data in a way that allows for fast lookups. In cloud engineering, dictionaries can be used for storing configuration settings, environment variables, or mapping resources to their properties, making infrastructure management more efficient.</p><p><strong>For Loops:</strong><br>The for loop is one of the most powerful features in Python. It allows me to iterate over a sequence (like a list or dictionary) and perform actions on each item. This is especially helpful when automating tasks across multiple cloud resources or performing bulk updates. For example, I can use for loops to automate the creation of virtual machines or manage a fleet of cloud instances.</p><p><strong>Functions:</strong><br>I learned how to define reusable blocks of code known as functions. Functions are a crucial concept in programming, enabling the modularization of code and reducing redundancy. In cloud engineering, functions can be used to handle repetitive tasks like provisioning resources, setting up configurations, or handling API calls, all of which are common in automation scripts.</p><h3>Enhancing Code Structure</h3><p><strong>Indentation:</strong><br>Python relies on indentation to define code blocks, which makes the language clean and easy to read. Proper indentation is vital in Python, as it determines the scope of loops, conditionals, and functions. As I learned, maintaining clean and consistent indentation is important for ensuring that my scripts run as intended.</p><p><strong>Lists:</strong><br>Lists in Python are a versatile data structure that allows me to store collections of items. I learned how to create, manipulate, and access elements within lists, which is useful when working with multiple cloud resources. For example, a list of cloud instances or storage buckets can be iterated over for batch processing.</p><p><strong>String Concatenation:</strong><br>String manipulation is an integral part of programming. In Python, string concatenation allows me to combine text or variables into one cohesive string. Whether I’m generating log messages, creating API requests, or building commands for cloud automation, string concatenation helps me work with dynamic content effectively.</p><p><strong>Variables:</strong><br>Variables are the foundation of any program, acting as placeholders for data. I learned how to create variables and assign them values, enabling me to store user input, computation results, or API responses. In cloud engineering, variables are often used to hold configurations or authentication credentials, making them essential for security and scalability.</p><p><strong>While Loops:</strong><br>While loops are used to repeat an action as long as a certain condition is true. I found that while loops are useful for continuous monitoring and automation tasks. For example, in a cloud environment, a while loop can help monitor resource usage or check the status of a service until it meets a desired state.</p><h3>The Path Ahead: Python in Cloud Engineering</h3><p>As I continue my journey with Python, the language has proven to be a powerful tool for enhancing cloud engineering practices. From automating infrastructure tasks to integrating with cloud APIs, Python is a key enabler of cloud technology. The skills I’ve acquired — ranging from control structures to functions — provide a solid foundation for more complex tasks like cloud automation and managing infrastructure as code.</p><p>The flexibility of Python makes it an ideal language for cloud engineers looking to streamline operations, increase efficiency, and ultimately build more robust cloud systems. As I continue to explore Python’s capabilities, I look forward to diving deeper into more advanced concepts and leveraging them in cloud engineering projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2f5059fb545" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CICD For Lambda Function]]></title>
            <link>https://medium.com/@uzeir13/cicd-for-lambda-function-0385bb05f91f?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/0385bb05f91f</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[gi̇thub]]></category>
            <category><![CDATA[cicd]]></category>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Wed, 22 Jan 2025 23:58:33 GMT</pubDate>
            <atom:updated>2025-02-10T22:17:38.622Z</atom:updated>
            <content:encoded><![CDATA[<p>Embarking on my journey into the world of CI/CD, I’ve decided to leverage GitHub Actions to streamline the deployment process for an AWS Lambda function. The goal is simple: create a push-triggered workflow that updates my Lambda function whenever changes are committed to the repository. This project not only serves as an introduction to CI/CD but also bridges the gap between coding and automation.</p><p>To achieve this, I’ll configure a GitHub Actions workflow that listens for push events in my repository. This workflow will set up a Python environment, package the Lambda function, and deploy it seamlessly to AWS. AWS credentials will be securely stored in GitHub Secrets, ensuring that my deployment process remains both efficient and secure. This hands-on experience will not only deepen my understanding of CI/CD practices but also lay a solid foundation for future cloud-based automation projects. Stay tuned as I explore the power of GitHub Actions and AWS Lambda!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l6PCpDYL6TQloyTB74MRvQ.png" /><figcaption>Architecture for CI/CD Workflow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*qH4HEDR-QxxUdnPzUAEXJA.png" /></figure><p>I begin by connecting to my AWS account using the AWS CLI with my Access Key ID and Secret Access Key. These credentials are crucial for authenticating the deployment process from GitHub to AWS. For security purposes, I’ve carefully written down these details and will later store them in GitHub Secrets. This ensures that my credentials remain protected while enabling the workflow to interact with AWS seamlessly during the CI/CD process.</p><p>Next, I created a new repository on GitHub, naming it “lambda-cicd” to keep everything organized for this project. Once the repository was set up, I navigated to the “Secrets and variables” section in the repository settings, where I securely added my AWS Access Key ID and Secret Access Key as GitHub Secrets. This step is essential for keeping sensitive information private while allowing my GitHub Actions workflow to securely authenticate and interact with AWS services. With these secrets in place, I’m ready to proceed with building the automation workflow for my Lambda function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6-9BtiACfZiRtnElK2KHjA.png" /><figcaption>Sticking to the architecture. Lambda function was creating via the console</figcaption></figure><p>Once the Lambda function was successfully created via the AWS Management Console, I cloned the GitHub repository to my local machine. This allowed me to start working on the code locally, making it easier to test and iterate before pushing changes back to the repository. Cloning the repository ensures that I have the latest version of the project and can directly integrate my Lambda function code into the version control system, enabling a smooth CI/CD process as I continue to build out the workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1NpDVqVyTkB2Rsn4Wg6Uwg.png" /></figure><p>In VSCode, I created a Python file that mirrors the code I had already deployed in AWS Lambda. This local version of the function allows me to develop and test the code in a controlled environment before pushing any updates. By maintaining consistency between the local file and the AWS Lambda function, I ensure that the code I write and test locally is identical to the version running in the cloud. This setup helps prevent discrepancies and makes the development process more efficient as I prepare for automated deployments through GitHub Actions.</p><p>Next, I created the GitHub Actions workflow file to deploy my Lambda function automatically when changes are pushed. In the root directory of the repository, I created a new directory structure: .github/workflows. Inside this directory, I added a new file named lambda-deploy.yml. This file defines the CI/CD workflow that will trigger whenever changes are pushed to the repository. In the workflow, I specified the necessary steps to set up the environment, install any dependencies, package the Lambda function, and deploy it to AWS using the AWS CLI. With this workflow in place, the Lambda function will be automatically updated and deployed each time changes are pushed to the repository, streamlining the entire deployment process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*euFd7jJiaRWPCTn737EYEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kpty1BSdZISdxDwlOJ0dCg.png" /></figure><p>This CI/CD workflow is designed to automatically trigger whenever changes are pushed to the main branch, specifically when there are updates within the lambda folder. Anytime the Lambda function code is modified and a git push is performed, the workflow will be activated. It begins by creating a job and setting a name for it, followed by configuring the runner, which is set to Ubuntu. The workflow then checks out the latest version of the code and sets up the Python environment to match the Lambda function&#39;s requirements.</p><p>Next, the workflow attempts to install any required packages and dependencies listed in the requirements.txt file. Since the file is empty, no additional actions take place at this step. Afterward, the AWS credentials stored securely in GitHub Secrets are validated to ensure secure communication with AWS. Finally, the workflow compresses the code in the lambda directory into a .zip file and deploys it directly to the specified Lambda function in AWS. This seamless automation ensures that updates are quickly and securely reflected in the Lambda function with every code change.</p><p>Once my code was written, it was time to test and ensure everything worked as expected. I started by staging my changes with git add ., committing them using git commit, and then pushing the updates to the main branch with git push origin main. The real moment of truth came when I checked the AWS Management Console and saw the Lambda function&#39;s updated code reflected there. Simultaneously, the GitHub Actions workflow ran smoothly, confirming that the deployment process was successful. Seeing everything come together was incredibly satisfying and validated the effort put into automating the pipeline.</p><p>In conclusion, this project was a rewarding journey into the world of AWS Lambda, local development environments, and GitHub Actions. By creating a Lambda function, setting up a local environment, and automating deployments with a GitHub Actions workflow, I gained valuable hands-on experience in cloud development and CI/CD pipelines. While there were some challenges along the way — such as dealing with syntax errors — they served as valuable learning opportunities, reinforcing the importance of attention to detail in code and configurations. This experience has not only deepened my understanding of serverless architecture but also highlighted the power of automation in modern development workflows. If you’re considering exploring AWS Lambda and GitHub Actions, I highly recommend diving in — it’s a game-changer!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0385bb05f91f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a VPC using Terraform]]></title>
            <link>https://medium.com/@uzeir13/creating-a-vpc-using-terraform-e85280203c43?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/e85280203c43</guid>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[iac]]></category>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 03:13:06 GMT</pubDate>
            <atom:updated>2025-01-11T03:13:06.733Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thzy84p_3m2BVkUCiuBOvw.png" /></figure><p>Terraform is a powerful Infrastructure as Code (IaC) tool that makes it easy to define and provision resources in the cloud. When creating a Virtual Private Cloud (VPC) in AWS, Terraform streamlines the process with its declarative syntax and reusable configurations. One of the biggest advantages of using Terraform is its cloud-agnostic nature, allowing you to manage infrastructure across multiple providers, not just AWS. Its robust state management and resource dependency tracking ensure your infrastructure remains consistent and predictable. Unlike traditional methods of manually configuring resources or writing long JSON or YAML files, Terraform offers concise code that’s easier to read and maintain.</p><p>While AWS’s native CloudFormation also supports IaC, Terraform offers distinct benefits, such as multi-cloud capabilities and a more intuitive error-handling process. When I used Terraform to create a VPC, I appreciated how clear and actionable its error messages were. Unlike CloudFormation, which sometimes presents cryptic logs requiring deeper digging, Terraform’s straightforward outputs made troubleshooting a breeze. This ease of use not only saved time but also made the entire process more enjoyable, reinforcing my confidence in managing cloud infrastructure efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MayP6MZU9BQqzG7wAg5gAw.png" /></figure><p>To begin my journey into Infrastructure as Code, I chose AWS as the cloud provider. I defined AWS as the provider and set up a Virtual Private Cloud (VPC) as the foundation for my infrastructure. This VPC serves as a isolated network, providing control over IP addressing, subnets, and routing within my cloud environment. With just a few lines of code, I could specify the CIDR block for the VPC and deploy it seamlessly. Terraform’s ease of use and clear resource definitions made this setup both efficient and rewarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m36tgLnctVcJ-Qoj6YHW0w.png" /></figure><p>To keep the setup simple yet resilient, I created two subnets within the VPC, each located in a different AWS Availability Zone. This design ensures high availability by distributing resources across multiple zones, minimizing downtime in case of a failure in one zone. Terraform made it effortless to define and provision these subnets, allowing me to specify their CIDR blocks and associate them with the appropriate Availability Zones. This straightforward approach provided a solid foundation for a robust and scalable infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qqqHsjekYSNFzyf2KuFiMQ.png" /></figure><p>To enable external connectivity for the public subnet, I added an Internet Gateway to the VPC. This gateway serves as the bridge between the VPC and the internet, allowing resources in the public subnet to send and receive traffic. Next, I created a route table and configured it with a route that directs all internet-bound traffic through the Internet Gateway. To finalize the setup, I associated the route table with the first subnet, ensuring that any resources deployed there could seamlessly communicate with the internet.</p><p>With the code for my VPC, subnets, Internet Gateway, and route table written, the next logical step was to initialize the Terraform configuration using terraform init. This command ensured that all necessary providers and modules were downloaded and set up correctly. Following the initialization, I moved on to terraform plan, which generates an execution plan showing the resources Terraform intends to create or modify. However, I encountered an unexpected error during this step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11edLLj1HC9w7HrxM8L2gg.png" /></figure><p>No project is complete without encountering errors, and debugging them is one of the best ways to truly understand the tools you’re using. While working on my Terraform project, I ran into a challenging error when trying to acquire the state lock.</p><p>This error occurs because Terraform uses DynamoDB for state locking when managing its backend, and the DynamoDB table was not set up correctly. Specifically, the table was missing the tf key, which is required for Terraform to manage state locks. To fix this, I ensured that the DynamoDB table had a primary key named LockID (or the key specified in the Terraform backend configuration) with the correct schema. Additionally, I validated the S3 backend configuration to ensure it pointed to the correct DynamoDB table and bucket.</p><p>While this issue was frustrating at first, resolving it deepened my understanding of Terraform’s backend mechanics and the importance of state management. Debugging errors like these not only enhances technical skills but also builds resilience, making the process of learning through practice incredibly rewarding.</p><p>After identifying and fixing the error during the terraform plan step, I ran the command again to ensure everything was configured correctly. This time, Terraform successfully generated the execution plan, providing a detailed preview of the resources it would create. Satisfied with the plan, I moved forward with terraform apply, which executed the configurations and brought my infrastructure to life. Within minutes, my VPC, along with its subnets, Internet Gateway, route table, and associations, was up and running in AWS.</p><p>This moment was incredibly rewarding as I witnessed the culmination of my efforts and troubleshooting. Terraform’s ability to translate a few lines of code into a fully functional cloud environment is both empowering and efficient. The entire process — from writing the code to debugging errors and deploying the infrastructure — reinforced the value of learning through experience and the power of Infrastructure as Code.</p><p>As my project came to an end, I wrapped things up with terraform destroy, which cleanly deleted all the resources I had created. This final step showcased Terraform&#39;s ability to manage the full lifecycle of infrastructure efficiently. Through this hands-on experience, I learned not only how to use Terraform to provision and manage cloud resources but also how to troubleshoot and debug errors effectively.</p><p>Debugging, while challenging, proved to be the most valuable aspect of the journey. It deepened my understanding of Terraform’s mechanics and taught me the importance of persistence and attention to detail. This project has transformed the way I approach problem-solving and infrastructure management. I’m excited to build on these skills and work on even more complex projects using Terraform in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e85280203c43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a VPC using AWS CloudFormation]]></title>
            <link>https://medium.com/@uzeir13/creating-a-vpc-using-aws-cloudformation-c77bcf570749?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/c77bcf570749</guid>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Thu, 26 Dec 2024 18:45:04 GMT</pubDate>
            <atom:updated>2024-12-26T18:45:04.614Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6CEiIPGCx0c-mWkxj5IGjQ.png" /></figure><p>As someone new to cloud computing, I decided to embrace Infrastructure as Code (IaC) to build my foundational AWS resources. Using CloudFormation, AWS’s IaC tool, I set out to create a Virtual Private Cloud (VPC) from scratch, learning the ins and outs of automating infrastructure along the way.</p><p>In this post, I’ll walk you through my journey of creating a VPC from scratch. Along the way, I’ll share how I expanded the setup with subnets, an Internet Gateway for external connectivity, and a Route Table to manage traffic. But it wasn’t all smooth sailing — I also faced some debugging challenges that helped me learn valuable troubleshooting techniques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*PHsJzmSuc-vvCfcI1NQ_9Q.png" /></figure><p>To get started, I wrote my CloudFormation template in VS Code, which made it easy to organize and validate my YAML file as I defined the resources. The first step was creating the VPC itself. I included key properties like CIDR block configuration to define the IP range for the VPC. Additionally, I set the EnableDnsSupport and EnableDnsHostnamesvalues to true in the template. Enabling DNS support ensures that AWS provides DNS resolution within the VPC, while enabling DNS hostnames assigns public DNS names to instances launched with public IPs. These settings are essential for resources like EC2 instances to communicate effectively, especially if they need internet connectivity or need to be reachable by external clients. This configuration laid the groundwork for building out the rest of the networking components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*nI-m2wVYqKJeqd1mb2VtlQ.png" /><figcaption>Pictured are the subnets in Availability Zone 1. Not pictured are the subnets in Availability Zone 2</figcaption></figure><p>After setting up the VPC, my next goal was to add subnets to ensure high availability and a well-structured network design. To achieve this, I created a total of six subnets, strategically distributed across two availability zones. This included one public subnet and two private subnets in each availability zone.</p><p>The public subnets were configured to host resources that require direct access to the internet. For the private subnets, I divided them into two distinct categories: application subnets and database subnets. This separation of resources not only enhances security but also ensures better control over network traffic. By leveraging multiple availability zones, I laid the foundation for a resilient and scalable architecture.</p><p>After writing the CloudFormation template to define the VPC, subnets, and their configurations, the next step was to deploy it by creating a stack in AWS. Using the AWS Management Console, I uploaded the YAML file and initiated the stack creation process.</p><p>During stack creation, CloudFormation parsed the template, validating the resources and properties I had defined. This step was crucial for catching any syntax errors or misconfigurations before actual deployment. I did have a few syntax errors that ended up being spacing errors.</p><p>After the initial stack was created, I realized I needed to update it to include the Internet Gateway and its associated configurations. Using CloudFormation’s ability to update stacks, I modified my template to add the Internet Gateway, attach it to the VPC, and configure the route table and public subnet associations.</p><p>As I was updating the stack, I faced a few stack error updates. The terminal will give a description on what the error is and what line number needs to be looked at. This was good practice for debugging my code. I came across the same issues of spacing and small errors such as missing a colon or a period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*m-atwVeSB8AHMmWMZnSo0g.png" /></figure><p>With the code corrected and with the subnets in place, the next step was to enable internet connectivity for the public subnets. To achieve this, I added an Internet Gateway to the CloudFormation template and attached it to the VPC. The Internet Gateway acts as the bridge between the VPC and the outside world, allowing resources in the public subnets to communicate with the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*B7HgaCG6YY4kME5cK3wOww.png" /></figure><p>After attaching the Internet Gateway, I created a route table specifically for the public subnets. Within the route table, I added a route that directed all outbound traffic (destination 0.0.0.0/0) to the Internet Gateway. This route ensures that any resource in the associated public subnet can access the internet when needed.</p><p>Finally, I associated this route table with the public subnets, specifically connecting it to the public subnet in Availability Zone 1A. This configuration allowed resources within Public Subnet 1A to access the internet, which is critical for tasks such as fetching software updates or serving web traffic. This setup marked the completion of the networking foundation for the public-facing resources in my architecture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c77bcf570749" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating S3 bucket using CloudFormation]]></title>
            <link>https://medium.com/@uzeir13/creating-s3-bucket-using-cloudformation-ea54a64cef94?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea54a64cef94</guid>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 20:28:47 GMT</pubDate>
            <atom:updated>2024-12-23T20:28:47.018Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AbMlZdsirodD8n94mUszkA.jpeg" /></figure><p><strong>Introduction:</strong> Developing my knowledge of Infrastructure as Code (IaC) and AWS CloudFormation has provided valuable insights into their importance in modern cloud computing. IaC offers key benefits such as consistency, speed, and scalability, while AWS CloudFormation simplifies resource deployment by enabling easy provisioning of stacks through templates. My goal is to continue practicing and refining my skills to efficiently deploy, build, and test applications.</p><p>My first project using Infrastructure as Code (IaC) involved creating an S3 bucket using AWS CloudFormation. I wrote the code in a .yaml format using VSCode as my text editor.</p><p><strong>Project Overview:</strong> The objective was straightforward — create an S3 bucket using CloudFormation.</p><p>I began by setting up a GitHub repository and cloning it to my local machine to manage the project effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*-JMcCdPq5eW0x6st2aBykA.png" /></figure><p>After cloning the repository, I opened my terminal and ran the aws configure command to connect the AWS CLI to my AWS account. This step ensured that my local environment was properly authenticated and ready for deploying resources. (Pictured Above)</p><p>When creating an S3 bucket with CloudFormation, the YAML template is the blueprint that defines the resources you want to deploy. Below is a simple example of a CloudFormation template to create an S3 bucket:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VR2Bs_Xw5JFeKaM7tJbzQ.png" /></figure><h4>Key Sections of the Template</h4><ol><li><strong>AWSTemplateFormatVersion</strong></li></ol><ul><li>This specifies the version of the CloudFormation template format being used.</li><li>In this case, &#39;2010-09-09&#39; is the current version and the standard for most templates.</li></ul><p><strong>2. Description</strong></p><ul><li>This section is optional but highly recommended for documentation purposes.</li><li>It provides a brief explanation of the template’s purpose. Here, it specifies that this template is for creating an S3 bucket.</li></ul><p><strong>3. Resources</strong></p><ul><li>The Resources section is the heart of the CloudFormation template. It defines the AWS resources you want to provision.</li><li>In this example, there is one resource: S3Bucket.</li></ul><p><strong>4. S3Bucket</strong></p><ul><li>This is the logical name for the S3 bucket resource. You can choose any meaningful name, as it’s only referenced within the template.</li></ul><p><strong>5. Type</strong></p><ul><li>This specifies the type of AWS resource to be created. For an S3 bucket, the type is &#39;AWS::S3::Bucket&#39;.</li></ul><p><strong>6. Properties</strong></p><ul><li>The Properties section allows you to configure specific settings for the resource.</li><li>Here, the BucketName property is used to set the name of the S3 bucket to uzeira-s3-bucket-yaml.</li></ul><h4>Why This Template Works</h4><ul><li><strong>Simplicity</strong>: The template focuses solely on creating an S3 bucket without additional configurations.</li><li><strong>Customizability</strong>: While this is a basic example, you can expand it with more properties like versioning, access control, or lifecycle policies.</li><li><strong>Scalability</strong>: By defining the bucket in code, you can easily replicate or modify the resource in different environments.</li></ul><h3>Deploying the CloudFormation Stack</h3><p>After writing the CloudFormation template for the S3 bucket, the next step is to deploy the stack using the AWS CLI. Here’s how I did it:</p><h4>Create the Stack</h4><p>Using the following AWS CLI command, I created the stack and associated it with the s3-bucket.yaml template:</p><blockquote>aws cloudformation create-stack — stack-name my-s3-bucket-stack — template-body file://s3-bucket.yaml</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hwWuife6ubbLQzLSKdaNYw.png" /></figure><h4>Key Observations</h4><ul><li><strong>StackStatus</strong>: The CREATE_COMPLETE status shows that the stack was successfully created without issues.</li><li><strong>No Rollbacks</strong>: The DisableRollback parameter is set to false, meaning that if an error had occurred during creation, the stack would have been rolled back to its previous state.</li></ul><p><strong>Conclusion:</strong> In this post, I share my experience creating an S3 bucket using AWS CloudFormation as part of my learning journey with Infrastructure as Code (IaC). I explain the steps involved in setting up the project, including creating a GitHub repository, configuring the AWS CLI, and writing a CloudFormation template in YAML. The post breaks down the key components of the template, such as AWSTemplateFormatVersion, Description, and Resources, and discusses why this approach is both simple and scalable. I also detail the process of deploying the stack using the AWS CLI, highlighting key observations such as stack creation status and rollback settings. Through this project, I gained valuable insights into IaC and CloudFormation’s role in automating cloud resource deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea54a64cef94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing a AWS VPC]]></title>
            <link>https://medium.com/@uzeir13/designing-a-aws-vpc-9234533f7c81?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/9234533f7c81</guid>
            <category><![CDATA[aws-architecture]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Wed, 04 Dec 2024 22:14:23 GMT</pubDate>
            <atom:updated>2024-12-04T22:14:23.449Z</atom:updated>
            <content:encoded><![CDATA[<p>The goal was to design a secure and highly available architecture on AWS.</p><p>I’ll start with having high availability. I started with creating two availability zones which improves availability, fault tolerance and disaster recovery. Within the two AZs I have a total of 6 subnets. Two public and four private. In the case of one of the subnets going down in one AZ the second AZ will pick up any traffic.</p><p>Security is becoming more important today. To ensure security in the VPC the EC2 instance and Database are hosted in the private subnet. This ensures they can only be accessed within the VPC and not through the internet. The public subnets are connected to an internet gateway to have access to the internet. In the public subnet I have a NAT gateway to allow instances in the private subnet to access the internet for updates and patches without having direct access to the internet. Route tables are added so the private subnets are able to transfer data packets to each other. Lastly, the database has a security group attached to it, allowing only approved IP addresses to access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zDxax2yOCV8aAEXLVyOm9Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9234533f7c81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 3 Project: Designing and Comparing Architectural Styles]]></title>
            <link>https://medium.com/@uzeir13/week-3-project-designing-and-comparing-architectural-styles-77333042b7eb?source=rss-1cce55f58086------2</link>
            <guid isPermaLink="false">https://medium.com/p/77333042b7eb</guid>
            <dc:creator><![CDATA[Uzeir Siddiqui]]></dc:creator>
            <pubDate>Tue, 08 Oct 2024 22:48:42 GMT</pubDate>
            <atom:updated>2024-10-08T22:48:42.752Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Project 1:</strong> design a simple e-commerce application starting off with a monolithic architecture then refactor it to microservices and finally propose a serverless approach.</p><p><strong>Monolithic Approach</strong> — An application built on this architecture is treated as a single unit. Which means if you make changes to one unit the entire application needs to be redeployed. The advantages to this is the simplicity. There are more disadvantages in my opinion. Those being it’s less scalable, there is little flexibility and deployment is an issue since it is a single unit.</p><p>Core Functions:</p><p><strong>U/I </strong>— User interface where the user interacts with the front-end, this can be the website when the user first interacts with the e-commerce application.</p><p><strong>Business Logic:</strong></p><p>User Registration — allowing users to create an account.</p><p>Product catalog — list of all products available to purchase.</p><p>Shopping cart — allows users to add and drop products from the website.</p><p>Order Processing — allows users to process payment, track orders and place orders.</p><p><strong>Database</strong> — single database for all entities</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iSjp1ehZobIE6L5grSwnA.png" /><figcaption>Monolithic Architecture</figcaption></figure><p><strong>Refactoring to Microservices Approach</strong> — This is a more modern approach, where the application is built as a collection of small independent services each having a business functionality. Microservices architecture is widely adopted in modern cloud-based systems. This approach is flexible, scalable and fault tolerant. It’s mainly used in e-commerce or financial services applications. In terms of flexibility, if we need to make improvements to the user registration we will not have to make changes to the other microservices. I’ve explained some of the advantages. Disadvantages include, the complexity of multiple services and maintaining consistency throughout the databases. Each service will have its own database, allowing for independent scaling and optimization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pAXJdIxPcVrqtbxTy6u6mw.png" /><figcaption>Microservices Architecture</figcaption></figure><p><strong>Proposing a serverless approach</strong> — In a serverless architecture the only change that is made is having Lamda representing the serverless architecture. User registration and Order processing can be done serverless with Lamda. The advantage here is scaling is done automatically if there is an increase in user traffic. And we pay for what we use which helps reduce cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAqOFdVOATqyTrc4dX8vbw.png" /><figcaption>Serverless Architecture</figcaption></figure><h4>Suitability for different scenarios</h4><ul><li><strong>Monolithic</strong>: Best for small to medium-scale projects where simplicity and uniformity are essential, and the load is relatively consistent.</li><li><strong>Microservices</strong>: Best for e-commerce or financial applications, where scalability, flexibility, and fault isolation are required.</li><li><strong>Serverless</strong>: Best for highly variable loads and applications where operational management needs to be minimized. Suitable for specific functionalities like authentication or payment processing in larger systems.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77333042b7eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>