<?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 Gustavo Lugo on Medium]]></title>
        <description><![CDATA[Stories by Gustavo Lugo on Medium]]></description>
        <link>https://medium.com/@gustavo.lugo2025?source=rss-d86b5716db1d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hAOIUJZy2M4iZPk4kRm8yg.jpeg</url>
            <title>Stories by Gustavo Lugo on Medium</title>
            <link>https://medium.com/@gustavo.lugo2025?source=rss-d86b5716db1d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 01:18:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gustavo.lugo2025/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[What an Automated Video Editor Taught Me About Python and AWS]]></title>
            <link>https://medium.com/@gustavo.lugo2025/what-an-automated-video-editor-taught-me-about-python-and-aws-b66d01d04f87?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b66d01d04f87</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 20:03:48 GMT</pubDate>
            <atom:updated>2026-11-06T20:03:48.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*M8Ja9z90pp4uBt4LSu8xCQ.png" /></figure><h3><strong>The problem</strong></h3><p>Picture a company managing 500 rental properties, all stored in one database. Someone has to track maintenance, inspections, and anything that needs attention. They can review every record by hand, or use a property management system.</p><p>Now swap the properties for 500 AWS resources: EC2 instances, S3 buckets, RDS databases. Checking that every one is configured correctly is the same problem, and it’s a big job to do by hand.</p><p>This is a problem for anyone who runs more than a handful of things in the cloud. Cloud engineers, but also anyone who has ever copy-pasted the same fix into twenty places.</p><p>It’s also the reason I started down this road. I built an automated video editing workflow with Claude Code, and I’m using it to help produce the video version of this post. (See video here on <a href="https://www.linkedin.com/in/gustavolugo/">linkedin</a>) That project made me ask: <strong><em>what else can I automate?</em></strong> The answer runs through Python and AWS.</p><h3><strong>What I built</strong></h3><p>This week I wrote a set of small Python scripts that model real AWS tasks. Each one covers one fundamental, and each uses AWS-shaped data instead of made-up examples: EC2 instance IDs, IP addresses for a security group, S3 bucket names.</p><p>The idea is simple. Python can take all that information, organize it, go through each item, check for conditions, and flag anything that needs attention. With Boto3, the AWS SDK for Python, the same code can talk to AWS and act on it.</p><h4>Here are the building blocks.</h4><p><strong><em>Lists</em></strong> hold many items, like all my instance IDs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52VVt-oQNlYC4cagxypKMg.png" /></figure><p><strong><em>Dictionaries</em></strong> organize the details of one thing, like one EC2 instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qbhb7BDV0FSL05lNzW_LUg.png" /></figure><p><strong><em>Loops</em></strong> go through every record, so I don’t have to touch each one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gy-BcHg3dxS07Ab_V4BboA.png" /></figure><p><strong><em>Conditionals</em></strong> decide what needs attention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ftdJ_4Lt80jBmbqK9-wtg.png" /></figure><p><strong><em>Functions</em></strong> package a task so I can reuse it. More on that in the result.</p><h3><strong>The decisions</strong></h3><p><strong>Fundamentals before automation.</strong> Learning the basics first: variables, lists, dictionaries, loops, functions. Automation code is just those pieces combined. I wanted to understand not only how to get code working, but why it works. Otherwise I can’t debug it when it breaks, and it will break.</p><p><strong>AWS-shaped examples instead of toy ones.</strong> I picked EC2 states, instance IDs, availability zones, and S3 bucket names. It’s slower to set up, but every exercise doubles as practice for the job I’m training for, and the concepts stick because I can see where they’ll be used.</p><h3><strong>What broke</strong></h3><p>Things broke, and that’s where the learning happened. I wrote a condition with a single equals sign instead of two:</p><blockquote>```python</blockquote><blockquote>if instance_running = “running”:</blockquote><blockquote>```</blockquote><blockquote>Python stopped immediately:</blockquote><blockquote>```</blockquote><blockquote>SyntaxError: invalid syntax. Maybe you meant ‘==’ or ‘:=’ instead of ‘=’?</blockquote><blockquote>```</blockquote><p>The fix was one character: `=` assigns a value, and `==` compares two values. The error message even told me. Reading it carefully, instead of guessing, is the skill.</p><p>It came back in an AWS exercise: checking whether a public access block is on. My first attempt used the single `=` again, and compared against `”running”`, a word that made no sense for a True/False setting:</p><p>The working version uses `==` and compares against real `True` and `False` values:</p><blockquote>```python</blockquote><blockquote>public_access_block = True</blockquote><blockquote>if public_access_block == True:</blockquote><blockquote>print(“The Public Access is locked down”)</blockquote><blockquote>elif public_access_block == False:</blockquote><blockquote>print(“The public access block open”)</blockquote><blockquote>else:</blockquote><blockquote>print(“The public access block is in an unexpected state”)</blockquote><blockquote>```</blockquote><h3><strong>The result</strong></h3><p>I can now read and write the Python behind a simple AWS check, and I can follow more of the code in my own projects, like my AWS Lambda one.</p><p>The clearest proof is a small function I wrote. It generates a name with a random 4-digit suffix. That matters in AWS because S3 bucket names must be globally unique:</p><blockquote>```python</blockquote><blockquote>import random</blockquote><blockquote>def generate_bucket_name(project_name):</blockquote><blockquote>random_suffix = random.randint(1000, 9999)</blockquote><blockquote>bucket_name = f”{project_name}-bucket-{random_suffix}”</blockquote><blockquote>return bucket_name</blockquote><blockquote>new_bucket = generate_bucket_name(“banana”)</blockquote><blockquote>print(f”Created new S3 bucket: {new_bucket}”)</blockquote><blockquote>```</blockquote><p>Each run gives a different name (`banana-bucket-6450`, `banana-bucket-4667`, `banana-bucket-4104`), with 9,000 possible suffixes per project name.</p><p>A caveat: this is not a production automation system, and I’m not claiming it is. The result is a better foundation. Next, I’ll put these pieces together with Boto3 to check real resources.</p><p><strong>What I’m building toward:</strong> the same idea as my video editing workflow. Describe the job once, and let code do the repetitive part.</p><p><em>If you’d like to see it in action, watch the video: </em><a href="https://www.linkedin.com/in/gustavolugo/">Link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b66d01d04f87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing Before Deployment: Building a CI/CD Pipeline with GitHub Actions and AWS]]></title>
            <link>https://medium.com/@gustavo.lugo2025/test-the-recipe-before-you-serve-it-1b7a71404e80?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b7a71404e80</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 17:40:54 GMT</pubDate>
            <atom:updated>2026-11-02T17:28:44.770Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine you’re remodeling your kitchen and you’ve picked out new tile.</p><p>You wouldn’t order enough tile for the entire kitchen without first checking the specifications and testing a few samples in the actual space. You’de want to make sure everything fits before committing to the remodel.</p><p>That’s essentially the idea behind Continuous Integration and Continuous Deployment, or CI/CD.</p><p>In software development, engineers don’t want to push changes directly into production and hope everything works. They want to test those changes first, catch problems early, and only deploy when everything checks out.</p><p>Hi, I’m Gustavo, a cloud engineering student at Cloud Engineering Academy. This week, I worked on a project using GitHub Actions and AWS that helped me put this process into practice.</p><h3>Here’s how it works.</h3><h4>The Problem</h4><p>Companies share a common risk: a small code change can introduce a bug that breaks an application or website.</p><p>Traditionally, developers might have to perform several testing and deployment steps manually. That takes time, creates opportunities for human error, and makes it easier for something to slip through.</p><p>A CI/CD pipeline automates much of that process.</p><p>Using GitHub Actions, developers can create workflows that automatically validate changes, test infrastructure, and deploy application code. Instead of relying on someone to remember every step, the workflow handles it consistently.</p><p>The goal of my project was to build a pipeline that tests infrastructure changes before they’re merged and automatically deploys Lambda code when changes reach the main branch.</p><h4>What I worked on</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGgtnnKZd1HzugDYYpQZfA.png" /></figure><p>The project calls for two separate GitHub Actions workflows that work together.</p><h4><strong>1. Continuous Integration: Test before merging</strong></h4><p>The first workflow runs when I open a pull request.</p><blockquote>Think of this as laying out those tile samples before committing to the remodel.</blockquote><p>The workflow performs two main tasks:</p><ol><li>It validates my AWS CloudFormation template to check for errors before attempting to create infrastructure.</li><li>It creates a temporary AWS test stack that includes an S3 bucket.</li></ol><p>This gives me an opportunity to test the infrastructure changes before merging them into the main branch.</p><p>Validating the template and launching the test stack takes approximately 16 seconds</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXM20ui3fZZuaJOc0j1pvA.png" /></figure><p>Once the pull request is merged, a cleanup job removes the temporary stack and its resources.</p><p>That means I’m not leaving behind unnecessary AWS resources after testing is complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G52YD0oTujy4dqx1q8NTkg.png" /></figure><p><strong>2. Continuous Deployment: Deploy approved changes</strong></p><p>The second workflow handles deployment.</p><p>When Lambda code is pushed to the main branch, GitHub Actions automatically updates the AWS Lambda function.</p><p>This process takes approximately 12 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*flzf4nrCMYBLQKRNDWMt1Q.png" /></figure><p>Rather than manually updating the function, the workflow handles the deployment automatically whenever new code reaches the main branch.</p><p>Together, these two workflows create a process where changes are tested before merging and application code is automatically deployed afterward.</p><h3>Decisions I made</h3><p>A few implementation decisions were important to how I designed the project.</p><p><strong>Unique test stack names</strong></p><p>Each temporary test stack uses its GitHub pull request number rather than using one fixed name.</p><p>Why?</p><p>Two pull requests could be open at the same time. If both workflows attempted to create a stack with the same name, they could interfere with each other.</p><p>Using the pull request number gives each test environment a unique name. It also allows the cleanup workflow to identify the correct stack to delete.</p><p><strong>Validate before creating infrastructure</strong></p><p>Validating the CloudFormation template before attempting to create the test stack.</p><p>If the template contains errors, there’s no reason to proceed with creating infrastructure. Doing the validation first helps prevent failed or partially created stacks that someone would otherwise need to investigate and clean up.</p><p>These decisions help make the workflow more reliable and easier to manage.</p><h3>What broke and how I fixed it</h3><p>Of course, it didn’t work perfectly the first time.</p><p>My Lambda deployment workflow failed at the &gt; Deploy Lambda Function step with a {ResourceNotFoundException} error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfgGIYOpjYiZwg-zGJSSPQ.png" /></figure><p>At first, I had to figure out why AWS couldn’t find the Lambda function.</p><p>I went back to the GitHub Actions execution log and compared the error with the function name configured in my lambda-deploy.yaml file.</p><p>I found the problem.</p><p>The function name in my workflow was:</p><p>my-test-CI/CD-Lambda</p><p>But the actual Lambda function in AWS was:</p><p>my-test-cicd-lambda</p><p>The capitalization didn’t match.</p><p>AWS resource names are case-sensitive, so even though the names looked nearly identical, AWS treated them as different names.</p><p>I corrected the function name in the workflow, ran it again, and the deployment succeeded.</p><p>It was a small mistake, but it reinforced something important: knowing how to read execution logs and troubleshoot errors is just as important as knowing how to build the workflow in the first place.</p><h3>The result</h3><p>The project now has two working workflows.</p><p><strong>Pull request workflow</strong></p><p>When I open a pull request, GitHub Actions validates the CloudFormation template and launches a temporary test stack in approximately 16 seconds.</p><p>The cleanup job is skipped while the pull request remains open. It runs after the changes are merged.</p><p><strong>Lambda deployment workflow</strong></p><p>When Lambda code is pushed to main, GitHub Actions automatically updates the AWS Lambda function in approximately 12 seconds.</p><p>The result is a repeatable process that reduces manual steps, catches potential problems earlier, and automates deployment.</p><h3>How to run it</h3><p>If you’d like to explore the project or run it yourself, here’s what you’ll need.</p><p><strong>1. Configure AWS credentials</strong></p><p>In GitHub, navigate to:</p><p>Repository → Settings → Secrets and variables → Actions → New repository secret.</p><p>Create these two repository secrets:</p><ul><li>AWS_ACCESS_KEY_ID</li><li>AWS_SECRET_ACCESS_KEY</li></ul><p>The workflow uses these credentials to authenticate with AWS.</p><p><strong>2. Create the Lambda function</strong></p><p>Before running the deployment workflow, create an AWS Lambda function named:</p><p>my-test-cicd-lambda</p><p>Its currently set to regionus-west-1 , if you prefer you can change your region but don’t forget to amend your code on the cfn-validate-pr.yaml.</p><p><strong>3. Test the pull request workflow</strong></p><p>Open a pull request that changes a file inside the cloudformation folder. GitHub Actions will automatically trigger the validation and test stack workflow.</p><h3>What’s next?</h3><p>This project gave me hands-on experience connecting GitHub Actions with AWS, working with CloudFormation, automating infrastructure testing, and deploying Lambda code.</p><p>More importantly, it helped me understand how CI/CD fits into the bigger picture of cloud engineering.</p><p>I’m continuing to build projects that turn what I’m learning into practical AWS experience.</p><p><strong>Explore the project:</strong></p><p><a href="https://github.com/gustavolugo-MST/lambda-cicd">GitHub Repository: lambda-cicd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b7a71404e80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Client’s Next.js Portfolio on AWS: Breaking Down the S3 Bucket ConfigThe Project]]></title>
            <link>https://medium.com/@gustavo.lugo2025/deploying-a-clients-next-js-portfolio-on-aws-breaking-down-the-s3-bucket-configthe-project-3267579c71b9?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3267579c71b9</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-engineer]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[cloudfront]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Mon, 28 Sep 2026 01:49:45 GMT</pubDate>
            <atom:updated>2026-09-28T16:04:41.760Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V5EudW_glz26qeZx8KTPEw.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbWnjNHNz4yY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbWnjNHNz4yY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbWnjNHNz4yY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7997b5312a985aac4f1d2ef078f920c/href">https://medium.com/media/c7997b5312a985aac4f1d2ef078f920c/href</a></iframe><p>I’m a cloud engineering student, and this project came out of my coursework. The goal was pretty straightforward: take a Next.js portfolio site and deploy it on AWS using Terraform.</p><p>The project is framed around a client scenario. James Smith, a freelance web designer, has built a modern, responsive portfolio site and now needs somewhere to host it. The requirements are the kind you’d expect from a real client: it needs to be highly available, scalable, cost effective, and fast for visitors around the world.</p><p>That’s where my role comes in. I’m not the developer who built the website. I’m the cloud engineer responsible for taking the application and figuring out how to deploy it properly using Infrastructure as Code. In this case, that means Terraform, Amazon S3 for hosting, and CloudFront for global content delivery.</p><p>I actually made a point of explaining this distinction in the walkthrough video I recorded for the project. I didn’t write the Next.js application. My job was to understand how the application was structured well enough to deploy it correctly.</p><p>And there’s an important detail that makes this deployment possible. The site is a static export. There’s no server side rendering and no API routes running behind the scenes. Instead, next.config.js is configured with output: &#39;export&#39;, which tells Next.js to turn the application into plain HTML, CSS, and JavaScript files. Once you have those files, S3 and CloudFront can do the rest without needing a running web server.</p><p>The infrastructure is where I actually wrote the code. I broke the Terraform configuration into five small files: state.tf for remote state, main.tf for the AWS provider, s3.tf for the hosting bucket, cloudfront.tf for the CDN, and output.tf for displaying useful values after everything is deployed.</p><p>The two files that really deserve a closer look are s3.tf and cloudfront.tf. Together, they handle the actual hosting and global delivery of the site, and there’s a little more going on in those files than you might expect at first glance.</p><h3>The S3 bucket configuration, line by line</h3><pre>resource &quot;aws_s3_bucket&quot; &quot;website&quot; {<br>  bucket = &quot;gl-s3-nextjsblog&quot;<br><br>  website {<br>    index_document = &quot;index.html&quot;<br>    error_document = &quot;index.html&quot;<br>  }<br><br>  tags = {<br>    Name        = &quot;Portfolio Website&quot;<br>    Environment = &quot;Production&quot;<br>  }<br>}<br><br>resource &quot;aws_s3_bucket_public_access_block&quot; &quot;website&quot; {<br>  bucket = aws_s3_bucket.website.id<br><br>  block_public_acls       = false<br>  block_public_policy     = false<br>  ignore_public_acls      = false<br>  restrict_public_buckets = false<br>}<br><br>resource &quot;aws_s3_bucket_policy&quot; &quot;website_policy&quot; {<br>  bucket     = aws_s3_bucket.website.id<br>  depends_on = [aws_s3_bucket_public_access_block.website]<br><br>  policy = jsonencode({<br>    Version = &quot;2012-10-17&quot;<br>    Statement = [<br>      {<br>        Effect    = &quot;Allow&quot;<br>        Principal = &quot;*&quot;<br>        Action    = &quot;s3:GetObject&quot;<br>        Resource  = &quot;${aws_s3_bucket.website.arn}/*&quot;<br>      }<br>    ]<br>  })<br>}</pre><h3>Resource one: the bucket itself</h3><p>resource &quot;aws_s3_bucket&quot; &quot;website&quot; creates an S3 bucket and gives it a local name, website, used to reference it elsewhere in the code. That local name is arbitrary; it&#39;s not the bucket&#39;s real name on AWS, just a handle for this configuration.</p><p>bucket = &quot;gl-s3-nextjsblog&quot; is the actual, globally-unique name AWS assigns to the bucket. S3 bucket names have to be unique across all of AWS, not just one account, which is why it carries a personal prefix rather than something generic.</p><p>The website { } block turns on static website hosting. index_document tells S3 what file to serve as the homepage. error_document tells it what to fall back to if something goes wrong or a path isn&#39;t found, in this case the same index.html, standard practice for single-page applications since client-side routing needs every path to resolve back to the same entry file.</p><p>tags is just metadata, human-readable labels for organizing resources in the AWS console. No functional effect.</p><h3>Resource two: turning off the safety switches</h3><p>aws_s3_bucket_public_access_block exists because of a change AWS made after a lot of the tutorials this project&#39;s brief was based on were written. Newer AWS accounts default to blocking public access on every S3 bucket, a safety measure against accidental data exposure. That&#39;s a good default for most buckets. It&#39;s the wrong default for a bucket whose entire purpose is serving a public website.</p><p>This resource explicitly disables all four blockers for this one bucket. Skip this step, and the bucket policy in the next resource fails to apply, even if IAM permissions are otherwise correct. This was a real error hit while building this out: AccessDenied: ... because public policies are prevented by the BlockPublicPolicy setting in S3 Block Public Access. The fix was exactly this resource.</p><h3>Resource three: the policy that makes it public</h3><p>aws_s3_bucket_policy attaches a policy to the bucket, and depends_on = [aws_s3_bucket_public_access_block.website] explicitly waits for the public access block to resolve first. Terraform normally infers resource ordering by tracing references between resources, but there&#39;s no direct reference between the policy and the access block, so without depends_on, Terraform might try to apply the policy before the blockers are disabled and fail with the same error above.</p><p>The policy = jsonencode({ ... }) block is the actual permission document. Version = &quot;2012-10-17&quot; is boilerplate, AWS&#39;s standard policy language version, present on every IAM-style policy regardless of what it does. The Statement is where the logic lives: Effect = &quot;Allow&quot; and Principal = &quot;*&quot; together mean anyone, no identity or login required, is allowed. Action = &quot;s3:GetObject&quot; means read/download objects. Resource = &quot;${aws_s3_bucket.website.arn}/*&quot; scopes that permission to every object inside this specific bucket.</p><p>Notably absent: any IAM role. That’s not an oversight, it’s the point. IAM roles and policies are identity-based; they grant permissions to specific AWS identities, like a Lambda function or an EC2 instance. A bucket policy with Principal = &quot;*&quot; is resource-based and grants permission to the public at large, with no identity required at all. A public website needs the second kind, since visitors&#39; browsers don&#39;t have AWS credentials and shouldn&#39;t need any.</p><p>One more detail: jsonencode({...}) exists because AWS&#39;s policy engine only ever accepts JSON, regardless of which tool defines it, console, CLI, CloudFormation, or Terraform. Terraform&#39;s own configuration language, HCL, isn&#39;t JSON. jsonencode() is the bridge, converting an HCL-style object into a valid JSON string at apply time, so what actually reaches AWS is a properly formatted policy document.</p><h3>The CloudFront configuration, line by line</h3><pre>resource &quot;aws_cloudfront_distribution&quot; &quot;website_distribution&quot; {<br>  origin {<br>    domain_name = aws_s3_bucket.website.website_endpoint<br>    origin_id   = &quot;S3-Website&quot;<br><br>    custom_origin_config {<br>      http_port              = 80<br>      https_port             = 443<br>      origin_protocol_policy = &quot;http-only&quot;<br>      origin_ssl_protocols   = [&quot;TLSv1.2&quot;]<br>    }<br>  }<br><br>  enabled             = true<br>  default_root_object = &quot;index.html&quot;<br><br>  default_cache_behavior {<br>    allowed_methods  = [&quot;GET&quot;, &quot;HEAD&quot;]<br>    cached_methods   = [&quot;GET&quot;, &quot;HEAD&quot;]<br>    target_origin_id = &quot;S3-Website&quot;<br><br>    forwarded_values {<br>      query_string = false<br>      cookies {<br>        forward = &quot;none&quot;<br>      }<br>    }<br><br>    viewer_protocol_policy = &quot;redirect-to-https&quot;<br>    min_ttl                = 0<br>    default_ttl            = 3600<br>    max_ttl                = 86400<br>  }<br><br>  restrictions {<br>    geo_restriction {<br>      restriction_type = &quot;none&quot;<br>    }<br>  }<br><br>  viewer_certificate {<br>    cloudfront_default_certificate = true<br>  }<br><br>  tags = {<br>    Name        = &quot;Portfolio CloudFront&quot;<br>    Environment = &quot;Production&quot;<br>  }<br>}</pre><p>resource &quot;aws_cloudfront_distribution&quot; &quot;website_distribution&quot; creates the CDN itself, the layer that sits in front of the S3 bucket and actually serves the site to visitors worldwide.</p><p>The origin { } block tells CloudFront where to pull content from. domain_name = aws_s3_bucket.website.website_endpoint points it at the S3 static website endpoint created earlier, not the bucket&#39;s raw S3 API address, the distinction matters because the website endpoint supports things like the index_document/error_document redirect behavior, while the raw bucket endpoint doesn&#39;t. origin_id is just a label for this origin, used elsewhere in the config to say which origin a given cache behavior should pull from.</p><p>custom_origin_config sets the connection details CloudFront uses to reach that origin: standard HTTP (80) and HTTPS (443) ports, origin_protocol_policy = &quot;http-only&quot; meaning CloudFront talks to the S3 website endpoint over plain HTTP (S3 website endpoints don&#39;t support HTTPS directly), and origin_ssl_protocols specifying which TLS version to use if it ever did negotiate SSL.</p><p>enabled = true turns the distribution on. default_root_object = &quot;index.html&quot; tells CloudFront what to serve when someone requests the root of the site with no specific path.</p><p>default_cache_behavior { } controls how CloudFront handles and caches requests. allowed_methods and cached_methods limit this to GET and HEAD, read-only operations, which makes sense for a static site with no forms or API calls to process. forwarded_values says not to forward query strings or cookies back to the origin, since a static site&#39;s content doesn&#39;t change based on either. viewer_protocol_policy = &quot;redirect-to-https&quot; forces every visitor onto HTTPS, even if they type http:// in the address bar. The three TTL values control caching duration: min_ttl, default_ttl (one hour), and max_ttl (24 hours), essentially telling CloudFront how long to keep serving a cached copy before checking back with S3 for changes. That caching is a big part of why CloudFront makes the site fast globally, most visitors are served from a nearby edge location&#39;s cache, never touching the actual S3 bucket at all.</p><p>restrictions with geo_restriction { restriction_type = &quot;none&quot; } means no countries are blocked, the site is available everywhere, matching the &quot;highly available worldwide&quot; requirement from the brief.</p><p>viewer_certificate { cloudfront_default_certificate = true } uses CloudFront&#39;s own default SSL certificate for the *.cloudfront.net domain, rather than a custom domain certificate. That&#39;s fine for this project since it&#39;s using the auto-generated CloudFront URL directly; a real production setup with a custom domain (like jamessmithportfolio.com) would need an ACM certificate here instead.</p><p>tags is the same kind of organizational metadata as in s3.tf, no functional effect.</p><p>One thing worth noting: this configuration is what pulls the whole project’s requirements together into one resource. The S3 bucket alone would satisfy “cost-effective” and technically “scalable,” but not “fast loading globally,” S3 serves from a single region. CloudFront is what turns a single-region static bucket into something genuinely globally distributed.</p><h3>Why this matters</h3><p>None of this is exotic Terraform. It’s a bucket, an access setting, and a policy, twelve total lines of actual logic. But each piece exists because of a real constraint: AWS’s newer security defaults, the JSON requirement baked into every AWS policy, and the fundamental difference between letting a specific role act versus letting anyone on the internet act. Understanding why each block is there, not just what it does, is the difference between copying a tutorial’s code and being able to debug it when AWS’s defaults inevitably shift again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3267579c71b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Went In for Dog Food. I Left Thinking About Load Balancers.]]></title>
            <link>https://medium.com/@gustavo.lugo2025/i-went-in-for-dog-food-i-left-thinking-about-load-balancers-dd28f1fe74f5?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd28f1fe74f5</guid>
            <category><![CDATA[petco]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[petsmart]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Mon, 14 Sep 2026 19:45:08 GMT</pubDate>
            <atom:updated>2026-09-14T19:45:08.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MlAPKAsoQGPvab9pSRcg3w.jpeg" /><figcaption>Mambo — my Bernadoodle :)</figcaption></figure><p>Ever stood in line at a major retailer and watched the cashier stare at a frozen screen while the line behind you keeps growing?</p><p>I see it all the time at a national chain where I buy dog food. The cashier is frustrated. Customers are waiting. And what should be a 30-second transaction turns into several minutes.</p><p>It got me thinking: <strong>what’s actually happening behind that screen?</strong></p><p>Is it the internet? Maybe. But I’d bet the bigger problem is somewhere deeper in the system, too many requests hitting the same resources at once, creating a bottleneck and slowing everything down.</p><p>And here’s the part businesses probably don’t want to think about: those few minutes of friction, repeated thousands of times across hundreds of locations, can translate into lost productivity, frustrated customers, and lost revenue.</p><p>That got me thinking about something I learned to build this week with <strong>AWS CloudFormation and Infrastructure as Code: an Application Load Balancer.</strong></p><p>Instead of sending every request to the same place and hoping it can keep up, a load balancer helps distribute that traffic across multiple servers so the system can handle the demand more efficiently.</p><h4><strong>Here’s what I built and how it works.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgQj-udNqh5RF8YRIx31kA.png" /></figure><p>Instead of starting from scratch, this project reused the VPC from an earlier project. One network split into subnets across two Availability Zones. That’s not incidental, it’s the whole reason a load balancer works at all: if every server lived in the same AZ, a single outage in that AZ would take everything down with it. Spreading targets across two AZs means the load balancer actually has somewhere else to send traffic if one entire zone has a problem, not just one server.</p><h3>The Load Balancer Itself</h3><pre>MyLoadBalancer:<br>  Type: AWS::ElasticLoadBalancingV2::LoadBalancer<br>  Properties:<br>      Subnets:<br>        - !Ref PublicSubnet1A<br>        - !Ref PublicSubnet2B<br>      SecurityGroups:<br>        - !Ref WebServerSecurityGroup</pre><p>Two properties, two jobs. Subnets tells the ALB which subnets it&#39;s allowed to live in, one in each Availability Zone, which is what gives it a presence in both AZs at once rather than being a single point of failure itself. SecurityGroups controls what traffic is actually allowed to reach it in the first place.</p><pre># Web Server / ALB Securty Group<br>  WebServerSecurityGroup:<br>    Type: AWS::EC2::SecurityGroup<br>    Properties:<br>      GroupDescription: &#39;Enable HTTP Access&#39;<br>      VpcId: !Ref MyVPC<br>      SecurityGroupIngress: <br>        - IpProtocol: &#39;tcp&#39;<br>          FromPort: &#39;80&#39;<br>          ToPort: &#39;80&#39;<br>          CidrIp: &#39;0.0.0.0/0&#39;</pre><p>That maps directly onto the diagram: the ALB sits inside the VPC, and reaches out to targets in AZ 1 and AZ 2 over HTTP, continuously running health checks against both. If a target stops responding to those health checks, the ALB simply stops sending it traffic, no manual intervention, no customer standing at a frozen register waiting for someone to notice.</p><p>That’s the part that matters beyond the lines of code. A load balancer isn’t just infrastructure, it’s the difference between a customer standing at a frozen register and a transaction that just works. For the customer, that’s ease of purchase, no friction, nothing to remember or complain about later. For the business, it’s no bottleneck at checkout, no line backing up because one resource got overwhelmed. And for shareholders, it’s simpler than either of those: fewer stalled transactions means more completed ones, and more completed transactions means more revenue. Three different people care about the exact same fix, for three different reasons, and it all traces back to one load balancer deciding, quietly and automatically, where to send the next request.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd28f1fe74f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cold Calls to Command Lines]]></title>
            <link>https://medium.com/@gustavo.lugo2025/cold-calls-to-command-lines-fbf283e57e62?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbf283e57e62</guid>
            <category><![CDATA[sales]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 17:27:06 GMT</pubDate>
            <atom:updated>2026-09-02T17:27:06.253Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m still a full-time sales professional. But after the workday ends, I’ve been burning the midnight oil learning the technical side of AWS and cloud infrastructure.</p><p>Right now, I’m spending a lot of time with <strong>CloudFormation, Infrastructure as Code, YAML, AWS CLI, Git/GitHub, and deployment workflows</strong>. I’m not just reading about these technologies, I’m building projects, tearing them down, rebuilding them, and repeating the process until I can work through the workflow without relying on a step-by-step tutorial.</p><p>That repetition has been eye-opening.</p><p>I’m starting to understand how infrastructure is defined in code, how resources depend on one another, how CloudFormation provisions and manages those resources, and how Git fits into the workflow for tracking and managing infrastructure changes.</p><p>And there’s something pretty satisfying about going from not knowing what VS Code or GitHub was a few weeks ago to writing templates, running CLI commands, deploying stacks, troubleshooting errors, and understanding <em>why</em> something works — not just following instructions to make it work.</p><p>Where does this take me? I’m not sure yet.</p><p>Maybe it leads toward cloud engineering. Maybe solutions engineering. Maybe technical sales or another role where I can combine my 20 years of sales and business development experience with technical knowledge.</p><p>I’m keeping the destination open.</p><p>What I do know is that <strong>it’s never too late to reinvent yourself.</strong></p><p>Your career is a journey, not a race. There’s no point comparing your chapter to someone else’s. I’m focused on learning, building, and becoming more technically capable one project at a time.</p><p>And honestly?</p><p><strong>I’m having a hell of a lot of fun doing it.</strong></p><p>From cold calls to command lines. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbf283e57e62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From ClickOps to DevOps — My first IaC project using AWS Cloudformation.]]></title>
            <link>https://medium.com/@gustavo.lugo2025/from-clickops-to-devops-my-first-iac-project-using-aws-cloudformation-2120a6f080f8?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2120a6f080f8</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 20:53:11 GMT</pubDate>
            <atom:updated>2026-08-29T21:32:24.759Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Xae_3csaNo0AUjL47bMVg.jpeg" /></figure><h4><strong>What if you learned that the house you live in was built from the contractor’s memory instead of a blueprint?</strong></h4><p>You’d probably think that was ridiculous. You’d expect the builder to follow an exact plan based on a well designed blueprint, a document that provides precise instructions for what goes where and how everything is supposed to be assembled. This week, I built the equivalent of that blueprint for the cloud.</p><p><strong>Infrastructure as Code (IaC)</strong> is a best practice for building and managing infrastructure in the cloud. My project was simple, but it was exciting because it was my first time using <strong>AWS CloudFormation</strong>.</p><p>I wrote a declarative CloudFormation template in YAML, a blueprint for a piece of AWS infrastructure, and let AWS build exactly what I specified.</p><p>The connection to construction really clicked for me.</p><p>In construction, contractors still have to deal with unknowns: weather, terrain, material availability, or materials that don’t behave exactly as the spec sheet says.</p><p>The cloud has its own unknowns: permissions, service limits, naming conflicts, and configuration issues.</p><p>But there’s an important difference. <strong>Cloud infrastructure can be made consistent and repeatable. </strong>Fix the blueprint once, and you can use it to build the same infrastructure the same way every time.</p><p>That’s the mental shift I’m starting to appreciate in cloud engineering: <strong>Don’t just build the system. Build the blueprint that builds the system. </strong>The exercise was designed to be simple and straightforward: deploy an S3 bucket using a CloudFormation template instead of the AWS CLI.</p><p>Prior to this project, I had only been exposed to ClickOps. Now I’m excited to venture into DevOps.</p><p>Essentially, instead of going into the AWS Dashboard and manually enabling and configuring services, I’m using Infrastructure as Code to perform the task. Simple in concept. In practice, it took four separate failures to actually get there.</p><p>Let me explain.</p><h4>First was a duplicate key.</h4><p>I had two AWSTemplateFormatVersion lines in my YAML file, one typed correctly, one with a typo (AWSTemplateVersion, missing “Format”). YAML doesn’t allow the same key twice, so I had to catch it and comment one out before the file was even valid syntax. I’d say thats my first lesson. In this scenario I missed a complete word but in actuality just one letter can throw the entire thing off. Attention to detail is really important.</p><h4>Second, VSCode was sitting in “Restricted Mode,”</h4><p>a safety setting that disables source control until you explicitly trust the folder. I had just downloaded it making this adjustment will be something I wont run into in the future. Without it enabled, my Source Control panel showed nothing until I found and clicked “Manage Workspace Trust.”</p><h4>Third, and the one that actually stumped me for a while:</h4><p>I ran the deploy command and got “At least one Resources member must be defined,” even though my file clearly had a Resources section. Turned out the file on disk didn’t match what I was looking at in the editor. I’d built out the full template visually, but never actually saved it. Cmd+S fixed that.</p><h4>Fourth, the deploy finally returned a StackId,</h4><p>which looked like success. It wasn’t. Checking the actual stack status showed ROLLBACK_COMPLETE, meaning AWS had built something, then torn it back down. Digging into the stack events (describe-stack-events) gave me the real reason: “Bucket name should not contain uppercase characters.” I’d named it Gustavo-S3-Bucket-Yaml, capital letters and all. S3 bucket names have to be entirely lowercase. I deleted the failed stack, renamed the bucket in lowercase, and redeployed. That time, it stuck: CREATE_COMPLETE.</p><p>None of these four errors were hard to understand once found. What they had in common was that AWS rarely tells you the real problem on the first try, “template error,” “validation error,” a StackId that looks like success. Getting to the actual cause meant going one layer deeper each time: checking the file, checking the status, checking the events. That’s the actual skill this exercise was testing.</p><p>Im going to run this project a few times again just so that it becomes second nature. Practice makes perfect.</p><p>Here are my final learning outcomes:</p><h4><strong>Learning Outcomes</strong></h4><p>By building this, I learned:</p><blockquote>How Infrastructure as Code differs from manually creating resources via CLI or console</blockquote><blockquote>How to read CloudFormation stack statuses, and why a returned StackId doesn’t guarantee success</blockquote><blockquote>How to trace a deployment failure back to its root cause using describe-stack-events</blockquote><blockquote>AWS-specific constraints (like S3’s global uniqueness and lowercase-only naming) that don’t show up until you actually deploy</blockquote><blockquote>Why “it looks right in the editor” isn’t the same as “it’s saved to disk”</blockquote><h4>A quick disclaimer:</h4><p>I’m on a journey to learn DevOps and cloud engineering. I like to say I’m going from cold calls to command lines. I’ve spent the past 20 years in business development, and now I’m transitioning into a space I’m genuinely curious about and excited to learn. I believe the best way to provide solutions in any field is to understand the mechanics behind how things actually work. So here I am, learning by doing. If you have more experience and see something I missed, something I should consider, or something you think I should include in a future project, I encourage you to leave a comment. I’m here to learn, and I’m always open to feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2120a6f080f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The mental shift from managing a server to managing a system]]></title>
            <link>https://medium.com/@gustavo.lugo2025/the-mental-shift-from-managing-a-server-to-managing-a-system-7f856d748c7f?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f856d748c7f</guid>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 14:54:30 GMT</pubDate>
            <atom:updated>2026-08-25T19:06:25.378Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sBtzr3_3iaEaApPzrXYbYA.png" /></figure><p>This week’s AWS project focused on working across distributed infrastructure and understanding how the pieces interact.</p><p>I worked across my local machine and EC2 instances in two separate Availability Zones, establishing connections, transferring files, configuring security, troubleshooting connectivity, and intentionally breaking a connection to validate the architecture and security controls.</p><p>One of the biggest takeaways was realizing that <strong>not every private subnet needs internet access</strong>. Instead of giving private instances a path to the internet through a NAT Gateway, I used a secured Bastion host in the public subnet as a controlled entry point for SSH management.</p><p>That forced me to think about infrastructure differently: for every resource, does it actually need to talk to the internet, or does it simply need to be accessible to me?</p><p>Those decisions aren’t just about making something work. They’re where security, architecture, and cost start to intersect.</p><p>What I enjoy about cloud engineering is that the infrastructure doesn’t have to be physically in front of you. You need to understand what’s happening across the environment and be able to manage it securely from anywhere.</p><p>Another solid project in the AWS portfolio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lb3zYipg8A1xspXS3IhxvQ.png" /><figcaption>follow the red line to private app subnet 2</figcaption></figure><p><strong>The setup:</strong> one EC2 instance sitting in a public subnet (the Bastion), and private EC2 instances sitting in subnets with no direct internet access. The only way to reach the private instances is to first SSH into the Bastion, then hop from there into the private instance.</p><h3>Step 1: Connect to the Bastion from my laptop</h3><p>ssh -i bastionkeypair.pem ec2-user@[BASTION-PUBLIC-IP]</p><p>This worked immediately, dropping me into the Bastion’s shell.</p><h3>Step 2: Copy the key file up to the Bastion</h3><p>To make the second hop later, the Bastion needs a copy of the key file too. I opened a second terminal tab (still on my laptop) for this:</p><p>scp -i “bastion.pem” bastion.pem ec2-user@[BASTION-PUBLIC-IP]</p><p>cp: bastion.pem: No such file or directory</p><p>First bug: wrong filename. My actual key was named bastionkeypair.pem, not bastion.pem. Fixed the name:</p><p>scp -i “bastionkeypair.pem” bastionkeypair.pem ec2-user@[BASTION-PUBLIC-IP]</p><p>This one ran with no errors, so I assumed it worked. It didn’t, and I wouldn’t find out until a few steps later.</p><h3>Step 3: Attempt the hop into the private instance</h3><p>Back in the first tab, still inside the Bastion:</p><p>ssh -i “bastionkeypair.pem” bastionkeypair.pem ec2-user@[PRIVATE-EC2-IP]</p><p>ssh: Could not resolve hostname bastionkeypair.pem: nodename nor servname provided, or not known</p><p>Second bug: I typed the key filename twice in the command. SSH treated the extra one as the destination host it should connect to, and obviously failed to resolve “bastionkeypair.pem” as a hostname.</p><h3>Step 4: The session dropped entirely</h3><p>While debugging, my Bastion session disconnected on its own:</p><p>Read from remote host [BASTION-PUBLIC-IP]: Connection reset by peer</p><p>Connection to [BASTION-PUBLIC-IP] closed.</p><p>client_loop: send disconnect: Broken pipe</p><p>I didn’t notice right away that my terminal had dropped back to my local machine’s prompt, and I tried running the hop command from there instead of from inside the Bastion. That’s a third, separate bug, a private IP address isn’t reachable from my laptop at all, only from inside the VPC.</p><h3>Step 5: Actually finding the scp bug</h3><p>Reconnected to the Bastion, tried the key file, permission denied. Checked the Bastion’s home directory:</p><p>[ec2-user@ip-[BASTION-PRIVATE-IP] ~]$ pwd</p><p>/home/ec2-user</p><p>[ec2-user@ip-[BASTION-PRIVATE-IP] ~]$ ls</p><p>Empty. The key file was never actually there. Going back to review the scp command from step 2, the real bug surfaces:</p><p>scp -i “bastionkeypair.pem” bastionkeypair.pem ec2-user@[BASTION-PUBLIC-IP]</p><p>No colon, no destination path at the end. Without user@host:path, scp doesn’t know it’s a remote transfer, it just quietly does a local copy instead. Nothing was ever uploaded. The fix:</p><p>scp -i “bastionkeypair.pem” bastionkeypair.pem ec2-user@[BASTION-PUBLIC-IP]:~/</p><p>bastionkeypair.pem 100% 1674 98.5KB/s 00:00</p><p>That’s the transfer actually completing this time.</p><h3>Step 6: The hop finally works</h3><p>[ec2-user@ip-[BASTION-PRIVATE-IP] ~]$ ssh -i “bastionkeypair.pem” ec2-user@[PRIVATE-EC2-IP]</p><p>[ec2-user@ip-[PRIVATE-EC2-IP] ~]$</p><p>Prompt changed, confirming I was now inside the private instance, laptop to Bastion to private EC2, exactly as designed.</p><h3>Step 7: Testing connectivity to a second private instance</h3><p>ping [SECOND-PRIVATE-EC2-IP]</p><p>PING [SECOND-PRIVATE-EC2-IP] 56(84) bytes of data.</p><p>64 bytes from [SECOND-PRIVATE-EC2-IP]: icmp_seq=1 ttl=127 time=1.36 ms</p><p>64 bytes from [SECOND-PRIVATE-EC2-IP]: icmp_seq=2 ttl=127 time=0.984 ms</p><p>…</p><p>62 packets transmitted, 62 received, 0% packet loss, time 61080ms</p><p>Clean replies, confirming the two private instances could talk directly to each other inside the VPC.</p><h3>Step 8: Breaking it on purpose</h3><p>To actually understand what was making that connection possible, I deleted the security group rule allowing it and ran the same ping again:</p><p>ping [SECOND-PRIVATE-EC2-IP]</p><p>PING [SECOND-PRIVATE-EC2-IP]: 56 data bytes</p><p>Request timeout for icmp_seq 0</p><p>Request timeout for icmp_seq 1</p><p>…</p><p>80 packets transmitted, 0 packets received, 100.0% packet loss</p><p>Same two instances, same private IPs, same network path. The only thing that changed was permission, and connectivity broke instantly. That was the clearest confirmation I’ve had so far that security groups aren’t just a checkbox, they’re the actual thing standing between “this works” and “this doesn’t.”</p><h3>Takeaway</h3><p>Every bug in this exercise was small: a wrong filename, a missing colon, a duplicate argument, being in the wrong terminal tab. None of them were conceptually hard once found, but each one produced a completely different, confusing error message that didn’t obviously point back to the real cause. Tracing each one back to its actual root was the real exercise, more than the commands themselves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f856d748c7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Cold Call to Command Line]]></title>
            <link>https://medium.com/@gustavo.lugo2025/from-cold-call-to-command-line-abe3e6bc9063?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/abe3e6bc9063</guid>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Tue, 18 Aug 2026 19:55:22 GMT</pubDate>
            <atom:updated>2026-08-18T19:55:22.485Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7Ec71eUxjVKkp6GcPWiNA.jpeg" /></figure><p>The first time I ever made a cold call, I froze. It was dead air on the line, I forgot my scripts, my heart was going faster than it should for a simple phone conversation. Years later, the first time opening a terminal gave me a similar jolt, a blinking cursor, a blank black screen, and the very real feeling that one wrong move could break something.</p><p>Turns out both moments taught me the same lesson: you don’t get comfortable by understanding something first. You get comfortable by doing it, over and over, until it stops being new.</p><p>I spent years in sales before deciding to make the switch into cloud engineering, and the terminal has become my new friend. What used to feel like a black box now feels more like a control room. From one space, I can create and manage GitHub repositories, connect them over SSH, provision cloud storage, and configure the permissions controlling who and what can access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TQNL9aT0VTBp9iJAlll5A.png" /></figure><p>This week alone, I set up a repo, cloned it locally, connected it to GitHub over SSH, and created a directory for a future project. On the AWS side, I ran aws configure to link my CLI to my account, deployed an S3 bucket for object storage, and pushed a file into it directly from the command line. I also created an IAM role to control exactly what that bucket is allowed to talk to, and got my first real hands-on time with Linux, Bash, and the VI text editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufOW80Ih55Ce7DadSw5y8A.png" /></figure><p>AEs get a reputation, sometimes fairly, for selling things they don’t fully understand. Reciting features from a slide deck without knowing what’s actually happening underneath. That gap is part of why hands-on exposure to the technology matters. Having real understanding what your clients work with on a day to day is what makes someone a consultant versus a product pusher.</p><p>None of this makes me an expert yet, and I don’t pretend otherwise. But six months ago, none of these words would have meant anything to me. Now they’re becoming second nature, one repetition at a time.</p><p>Agree or disagree: does understanding the tech actually make someone better at selling solutions, or is that a skill set on its own?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abe3e6bc9063" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s Actually Happening When You Hit Play on YouTube]]></title>
            <link>https://medium.com/@gustavo.lugo2025/whats-actually-happening-when-you-hit-play-on-youtube-01b92ec100a5?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/01b92ec100a5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 04:18:29 GMT</pubDate>
            <atom:updated>2026-08-14T04:18:29.923Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ApklcHSA7rxbNGxP7fyXg.png" /></figure><p>I’ll admit, I spend an embarrassing amount of time on YouTube. So as part of my cloud engineering academy project, I decided to figure out, at a really high level, what’s actually happening behind the scenes when you upload and watch a video online. Not YouTube’s actual system, obviously, but a simplified version I designed myself to understand the moving parts.</p><p>Here’s roughly how it works.</p><h4><strong>Upload.</strong></h4><p>When you upload a video, it doesn’t go straight to viewers. It lands in cloud storage (S3) first, as a raw file.</p><h4><strong>Processing.</strong></h4><p>That upload kicks off two things at the same time. One service transcodes the video into multiple resolutions (360p, 720p, 1080p) so it can play smoothly whether you’re on wifi or spotty mobile data. Another service scans the video for inappropriate content before it ever reaches an audience.</p><h4><strong>Metadata.</strong></h4><p>All the details about the video — title, tags, moderation status, upload date — get stored separately from the video file itself, in a database built for fast lookups. That same data feeds a search index, which is what actually powers typing something into a search bar and getting results back.</p><h4><strong>Delivery.</strong></h4><p>Once a video is processed, it gets cached at locations around the world, so when you hit play, you’re pulling it from somewhere physically close to you instead of one server far away. That’s most of why videos start playing almost instantly no matter where you are.</p><p>None of this is the actual YouTube architecture, theirs is obviously a lot more complex. But building a simplified version myself made something I use every day a lot less like magic and a lot more like a system I actually understand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01b92ec100a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Server That Killed My Business]]></title>
            <link>https://medium.com/@gustavo.lugo2025/the-server-that-killed-my-business-6518a3c4ee69?source=rss-d86b5716db1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6518a3c4ee69</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[recruiting]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Lugo]]></dc:creator>
            <pubDate>Thu, 13 Aug 2026 20:45:48 GMT</pubDate>
            <atom:updated>2026-08-13T20:57:23.713Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_KpTZ0NCfUvMkwgr2zvgqQ.jpeg" /></figure><p>Back in 2002, I killed my own startup without even knowing it. I had an idea for a recruiting job site, so I quit my job as a headhunter for a Fortune 500 recruiting firm to chase it. The internet was the hot topic, and everyone was convinced the recruiting industry was finished. Websites like Monster.com dominated, and the consensus at the time was clear: why would hiring companies pay headhunters when they could access endless talent online? That’s obviously wrong, and good for another conversation on some other blog. My mission then was simple: create a site, jump on the wave, and make millions! (cue belly laugh)</p><p>Well, back then I had no cloud experience and a limited budget. Just a headhunter with a dream. So I hired a developer on elance.com and let him build my vision. Basic site, search functionality, job categories. He casually mentioned hosting it on his personal server. I nodded like I understood. I didn’t.</p><p>We launched. I drove traffic. Then everything fell apart. The site lagged. Pages wouldn’t load. Users gave up. My business died. I crawled back to my job as a headhunter, defeated.</p><p>For years, I wondered why it failed. I blamed the infrastructure, the hosting, the technology. But I was asking the wrong question. The real problem was that I never connected infrastructure failures to business failures: lost users, lost revenue, lost credibility. Today, I finally see it through the lens executives actually care about.</p><p>Let me walk you through two ways I’d build this today: a traditional architecture and a serverless one, and measure both against the business metrics that actually matter to executives.</p><h3><strong>Option 1 — </strong>Traditional Server Scaling Design</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTdU4Zrsjp8-fdB4CHZtJA.png" /></figure><h4>Vertical and Horizontal Scaling</h4><p>I would implement vertical scaling as a safety mechanism for increased traffic. This would be done by upgrading the instance type of existing EC2 instances to handle greater compute demand as traffic increases. For example, the system could go from an EC2 t3.medium to an EC2 t3.large. This would handle low, moderate, and high user activity. The same principle applies to the database layer; as read and write demand grows, the RDS instance type would be upgraded as well, for example moving from a db.t3.medium to a db.r5.xlarge instance, providing more CPU, memory, and I/O capacity to handle a growing volume of user accounts, job postings, and applications.</p><p>I would also utilize an (ASG) Auto Scaling Group for horizontal scaling. This service would add more of the same EC2 instances as demand increases, which the Load Balancer then distributes traffic across. Since requests can land on any instance in the fleet, session consistency is handled through Cognito, which issues a token (JWT) at login. Because the token itself carries the user’s identity, any EC2 instance can validate it independently, without needing shared session storage across the fleet.</p><h4>Performance Enhancement</h4><p>Performance would be enhanced by utilizing (CDN) Content Delivery Network. This service would allow for caching of common web assets allowing users to enjoy a seamless experience. Load Balancers would distribute traffic based on volume.</p><h4>Benefits and Limitations</h4><p>Some benefits and limitations exist with this design. Although functional, it isn&#39;t as efficient as a serverless option. For example, we have to monitor and correct any spikes in the architecture, which would require 24/7 monitoring staff. We would need to have reserved compute via EC2 instances for high demand periods and wasted compute when our site would get no traffic at midnight. We would also have to partially update each server as we roll out patches or upgrades. The cost would be greater than serverless because of the reserved compute resources and additional professional cloud engineers. For a startup, the balance of cost versus revenue is everything.</p><h4>Security</h4><p>The web servers, application servers, and database all sit inside a private subnet, meaning they are not directly accessible from the public internet. Only the Load Balancer, which sits in a public subnet, is internet-facing. All traffic must pass through the Load Balancer before reaching any backend resource, reducing the system’s exposure to direct attacks.</p><h3>Option 2 — Serverless Based Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTsG3RVd2MUEswXPlCfhxw.png" /></figure><h4>Serverless Compute (AWS Lambda)</h4><p>Serverless architecture is at the forefront of cloud architecture. AWS Lambda replaces the need for managed front and back end servers.</p><p>By design, Lambda automatically runs additional concurrent instances of the function as demand increases, with no server management required. There’s no need to interrupt the site, scaling happens seamlessly in the background.</p><p>One tradeoff worth noting is cold starts. When a Lambda function hasn’t been invoked recently, AWS needs to initialize a new execution environment before running the code, which adds a brief delay to that first request. This differs from EC2, where instances are already running and ready to respond immediately. For a startup’s traffic patterns, this delay is usually minor, but it’s worth considering for any feature where response time is critical.</p><h4>Database (DynamoDB)</h4><p>For a database, AWS DynamoDB serves as a serverless database for backend processing. Unlike the traditional route, there is no need to worry about capacity. It interacts with Lambda to process user requests. DynamoDB automatically scales its read and write capacity as the site grows, without any manual provisioning.</p><h4>Content Delivery and Storage (S3 &amp; CloudFront)</h4><p>S3 is an object storage service and it manages requests from the site and serves CloudFront’s cache.</p><p>CloudFront allows for a serverless cache system for user experience and performance.</p><h4>API Management (API Gateway)</h4><p>API Gateway manages and routes incoming requests, handling authentication through Cognito and throttling traffic, before forwarding valid requests to Lambda.</p><h4>Authentication and Authorization (Cognito, SNS, EventBridge)</h4><p>Cognito is directly connected to API Gateway. It creates a security and authentication function during registration. Users can then utilize services like SNS to provide them with job posting notifications via email. When a user clicks “apply,” the action triggers an event that EventBridge routes to a Lambda function, which processes the application.</p><h3>Performance and Cost</h3><p>When comparing both architectures against performance under varying load conditions, both designs would perform the job. Serverless offers the solution with less oversight. When it comes to cost-efficiency, the true design route depends on the stage of the organization. Early on, a site doesn’t have a baseline for traffic patterns. Using serverless allows for elasticity, and that comes at a cost. Once the site has more predictable patterns of traffic, then reserving compute may be a more cost-efficient route, allowing for better pricing for reserving compute over three years.</p><p>Every startup wants to gain viral success, and when you’re new to market you don’t know how much traffic you will get, and that crystal ball of cost predictability is a moving target. Serverless architecture helps with that issue from the onset. With serverless, you only pay for what you use. Both options serve response to traffic spikes, but when you need to upgrade compute on the traditional route you have to provision more servers to realize the traffic, which creates more management resources for the organization at additional cost.</p><h4>Implications</h4><p>Development workflows: On the traditional route, testing changes often requires a staging environment that mirrors the production server fleet, since the application depends on the specific server setup it runs on. With Lambda, individual functions can be tested and iterated on independently, without needing to replicate an entire server environment, which simplifies the development and testing cycle.</p><h4>Deployment processes</h4><p>With traditional EC2, deploying new code means pushing it out across a fleet of running servers. This methodical process ensures the site doesn’t go down mid-deploy. The load balancer only sends traffic to servers that have finished updating. With Lambda, you just upload your new code as a version. No fleet to coordinate, no servers to individually update. AWS handles routing traffic to the new version, and you can even do gradual rollouts.</p><h4>Maintenance requirements</h4><p>With EC2, you’re responsible for patching the operating system, and this is ongoing work regardless of whether your code itself changes. With Lambda, AWS manages the OS and underlying infrastructure entirely. You only maintain your application code, not the servers it runs on. That’s the core value proposition of “serverless”; the operational burden of keeping servers healthy disappears.</p><h4>Monitoring and troubleshooting</h4><p>Both designs can be monitored using AWS CloudWatch, which tracks metrics like CPU usage, request counts, and error rates. Troubleshooting on the traditional route often means checking logs across multiple servers to find where an issue occurred. With Lambda, CloudWatch automatically aggregates logs per function invocation, making it easier to trace a single request path through the system.</p><h4>Use Cases</h4><p>Choosing between these architectures depends on where the business actually is, not just which technology is trendier. For a startup with unpredictable traffic, a small team, and a tight budget, serverless is the clear choice. There’s no infrastructure to manage, costs scale with actual usage, and a small team isn’t burdened with 24/7 server monitoring. For an established company with consistent, high-volume traffic and an in-house engineering team already skilled in managing servers, traditional EC2 scaling can become more cost-effective at that scale, and offers more direct control over the underlying environment for complex, custom workloads.</p><p>Compliance-heavy industries that require tighter control over infrastructure configuration may also lean toward the traditional route for that same reason. For my recruiting platform specifically, starting serverless makes the most sense. I don’t yet know what traffic to expect, I don’t have a dedicated ops team, and I’d rather spend a limited budget on features than idle server capacity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6518a3c4ee69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>