<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Noureldin ehab</title>
    <description>The latest articles on DEV Community by Noureldin ehab (@noureldin_ehab).</description>
    <link>https://dev.to/noureldin_ehab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3023541%2F79a69a55-82e1-43b9-a5a7-5a687c98c094.jpg</url>
      <title>DEV Community: Noureldin ehab</title>
      <link>https://dev.to/noureldin_ehab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/noureldin_ehab"/>
    <language>en</language>
    <item>
      <title>Set Up a Local AWS Environment with MiniStack</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Tue, 30 Jun 2026 17:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/set-up-a-local-aws-environment-with-ministack-2k2a</link>
      <guid>https://dev.to/aws-builders/set-up-a-local-aws-environment-with-ministack-2k2a</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F46goqnbwv0sepfnjwngv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F46goqnbwv0sepfnjwngv.png" alt=" " width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Running cloud infrastructure locally is now easier than ever with tools like MiniStack.&lt;/p&gt;

&lt;p&gt;This shift became even more important recently, as LocalStack changed its model requiring accounts, authentication tokens, and introducing paid plans for full usage.&lt;/p&gt;

&lt;p&gt;As a result, many developers are looking for simpler, fully local, and free alternatives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ministack.org/" rel="noopener noreferrer"&gt;MiniStack&lt;/a&gt; lets you run AWS like services locally using real containers (Postgres, Redis, S3), making development faster, cheaper, and fully offline.&lt;/p&gt;

&lt;p&gt;In this guide, we will use MiniStack to spin up a local AWS like environment and then use Stakpak to interact with it, configure it, and operate it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;LocalStack moved core services behind a paid plan.&lt;/strong&gt; If you relied on LocalStack Community for local dev and CI/CD, &lt;a href="https://ministack.org/" rel="noopener noreferrer"&gt;MiniStack&lt;/a&gt; is your free, MIT-licensed drop-in replacement. No sign up, no API key, no telemetry.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;Setting up and working with local cloud environments manually can still be painful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to configure services (databases, storage, networking)&lt;/li&gt;
&lt;li&gt;You have to remember CLI commands or SDK usage&lt;/li&gt;
&lt;li&gt;You need to debug issues across multiple containers&lt;/li&gt;
&lt;li&gt;You manually test if services are actually working&lt;/li&gt;
&lt;li&gt;You document setup steps for future use&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even with tools like MiniStack replacing LocalStack for many use cases, &lt;strong&gt;operating local infrastructure is still manual work&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Small mistakes like misconfigured services, missing environment variables, or broken connections can slow down development.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ministack.org/" rel="noopener noreferrer"&gt;MiniStack installed&lt;/a&gt; (or you can ask Stakpak to install it)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.docker.com/get-started/" rel="noopener noreferrer"&gt;Docker Installed&lt;/a&gt; (or you can ask Stakpak to install it)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F76s52s8p7qjy90q1wcl2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F76s52s8p7qjy90q1wcl2.png" alt=" " width="800" height="601"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Application
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What the app does
&lt;/h3&gt;

&lt;p&gt;A user uploads a CSV or JSON file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It lands in S3.&lt;/li&gt;
&lt;li&gt;An event sends a job to SQS.&lt;/li&gt;
&lt;li&gt;A Lambda reads the message.&lt;/li&gt;
&lt;li&gt;The Lambda parses the file and stores results in Postgres.&lt;/li&gt;
&lt;li&gt;It writes job state to Redis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check the code source &lt;a href="https://github.com/noureldin-azzab/aws-local-file-processor" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can start that we understand the app and the architecture, we can start deploying it&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open Stakpak and ask it to deploy your app locally. That's it!&lt;/li&gt;
&lt;li&gt;It read the codebase and understood the architecture&lt;/li&gt;
&lt;li&gt;Spun up MiniStack, Postgres, and Redis via Docker Compose&lt;/li&gt;
&lt;li&gt;Bootstrapped AWS resources: S3 bucket, SQS queue, and Lambda&lt;/li&gt;
&lt;li&gt;Connected SQS to Lambda so uploads trigger processing automatically&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not lets test it..&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5offqvmel26deyvp6e4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5offqvmel26deyvp6e4e.png" alt=" " width="799" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's working 🥳&lt;/p&gt;

&lt;p&gt;Here is what happened:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We uploaded sample.csv -&amp;gt; got back a job_id&lt;/li&gt;
&lt;li&gt;Lambda fired within 5 seconds (SQS polling)&lt;/li&gt;
&lt;li&gt;Redis shows status: done, rows_inserted: 5&lt;/li&gt;
&lt;li&gt;Postgres has all 5 rows parsed and stored&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcw8uqo3en8jlhv14q0tz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcw8uqo3en8jlhv14q0tz.png" alt=" " width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Related Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/detect-and-fix-missing-backups-for-a-postgresql-db-in-production" rel="noopener noreferrer"&gt;Detect and Fix Missing Backups for a PostgreSQL DB in Production&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/deploy-your-own-openvpn-server-on-aws" rel="noopener noreferrer"&gt;Deploy your own OpenVPN Server on AWS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and more...&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="///docs/get-started/configure-stakpak.md"&gt;Configure Stakpak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ministack.org/" rel="noopener noreferrer"&gt;MiniStack Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>infrastructure</category>
      <category>devops</category>
    </item>
    <item>
      <title>Load Test to Optimize Cloud Costs</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Mon, 29 Jun 2026 17:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/load-test-to-optimize-cloud-costs-3n0a</link>
      <guid>https://dev.to/aws-builders/load-test-to-optimize-cloud-costs-3n0a</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;Most load testing tools focus on performance metrics like response times and throughput. They don't show you how much your scaling decisions cost in real time.&lt;/p&gt;

&lt;p&gt;This guide shows you how to use Stakpak to see both performance &amp;amp; cost during load tests. You'll learn exactly how much each scaling decision costs, so you can find the cheapest way to keep your app running smoothly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;Companies face a lot of challenges while trying to optimize cloud costs through load testing:&lt;/p&gt;

&lt;h2&gt;
  
  
  The limitations of traditional load testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Standard load testing tools focus on performance metrics such as response times, throughput, and error rates. &lt;/li&gt;
&lt;li&gt;Then they use these results to make architectural design decisions like scaling services, adding replicas, or reconfiguring infrastructure without thinking about the financial impact.&lt;/li&gt;
&lt;li&gt;They only realize the true cost of their architectural decisions once the cloud bill arrives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This disconnect makes it difficult to align technical performance goals with cost optimization. Performance and cost live in two different universes&lt;/p&gt;

&lt;h2&gt;
  
  
  Business Impact
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Unpredictable monthly cloud bills&lt;/li&gt;
&lt;li&gt;Inefficient resource utilization (often 20-30% waste)&lt;/li&gt;
&lt;li&gt;Difficulty in capacity planning and budgeting&lt;/li&gt;
&lt;li&gt;Competitive disadvantage due to higher operational costs&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cloud provider credentials configured&lt;/li&gt;
&lt;li&gt;Application deployed and accessible&lt;/li&gt;
&lt;li&gt;Basic understanding of your application's architecture.&lt;/li&gt;
&lt;li&gt;Choose the endpoint you want to test (Staging or Ephemeral Environment)&lt;/li&gt;
&lt;li&gt;Make sure you have explicit permission to run load tests.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this guide, we will be load testing &lt;a href="https://github.com/kajogo777/hackathon-judge-app" rel="noopener noreferrer"&gt;&lt;strong&gt;hackathon-judge-app&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; Let's take a look at the Cloud Architecture and what this app does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcoe263poc62vop0q77pg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcoe263poc62vop0q77pg.png" alt=" " width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This setup deploys the &lt;code&gt;hackathon-judge-app&lt;/code&gt; on Amazon ECS Fargate in the eu-north-1 region.\&lt;br&gt;
Traffic flows through an Application Load Balancer (80/443 -&amp;gt; Target Group 8501) into ECS tasks running across two availability zones for high availability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Networking: VPC (10.0.0.0/16) with public subnets (NAT Gateways) and private app subnets.&lt;/li&gt;
&lt;li&gt;Compute: ECS Fargate cluster with auto scaling (1–2 tasks, CPU 70%, memory 80%).&lt;/li&gt;
&lt;li&gt;Registry: Amazon ECR stores the container images.&lt;/li&gt;
&lt;li&gt;Observability: CloudWatch Logs (7 days) and Container Insights enabled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let's take a look at the app&lt;/p&gt;
&lt;h2&gt;
  
  
  Application
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F681n2tk0sb096eg1m0z9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F681n2tk0sb096eg1m0z9.png" alt=" " width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Hackathon Judge App
&lt;/h3&gt;

&lt;p&gt;A Streamlit web application for judging hackathon pitches. Designed to be accessible through mobile web browsers with persistent data storage.&lt;/p&gt;
&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Judge selection: Each judge can select their name before scoring teams&lt;/li&gt;
&lt;li&gt;Team scoring: Judges can score teams based on configurable criteria&lt;/li&gt;
&lt;li&gt;Score persistence: All scores are saved to a local JSON file&lt;/li&gt;
&lt;li&gt;Mobile friendly design: Optimized for use on mobile devices&lt;/li&gt;
&lt;li&gt;Configurable through YAML: Easy to adjust teams, judges, and judging criteria&lt;/li&gt;
&lt;li&gt;Custom branding: Add your event logo and title for a personalized experience&lt;/li&gt;
&lt;li&gt;Authentication: Password protection for judges to secure the scoring process
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we can start that we understand the app and the architecture, we can start load testing our app&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal&lt;/li&gt;
&lt;li&gt;Open Stakpak by typing &lt;code&gt;stakpak&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this guide, we will use &lt;a href="https://httpd.apache.org/docs/2.4/programs/ab.html" rel="noopener noreferrer"&gt;Apache Bench&lt;/a&gt; to load test our app&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now let's ask Stakpak to &lt;code&gt;load test our app [insert app link] with Apache Bench and monitor its resource  utilization&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it stakpak will automaically figure out what to do and how to use &lt;a href="https://httpd.apache.org/docs/2.4/programs/ab.html" rel="noopener noreferrer"&gt;Apache Bench&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwffdntv494rv6459pz58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwffdntv494rv6459pz58.png" alt=" " width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we see that the CPU utilization spiked to 17.88% and memory remained stable at 15% and auto scalling wasnt triggred&lt;/p&gt;

&lt;p&gt;Now let's run the high load test &lt;code&gt;200 concarrunt users in 120 seconds&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2tv3h24w47cqkee0kavr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2tv3h24w47cqkee0kavr.png" alt=" " width="799" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even under stress testing, the highest CPU spike was 42.53%, far below the 70% auto-scaling threshold. This shows that the current infrastructure is over-provisioned for the tested workload and has plenty of headroom before scaling becomes necessary.&lt;/p&gt;

&lt;p&gt;If you want to see this in action you can see our Stakpak Ship It session where we did that live&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/HBvcfA6uUng"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Now that we’ve confirmed our infrastructure is over provisioned, the next step is to evaluate cost efficiency. With Stakpak, you can go beyond performance testing and ask it to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Estimate cloud costs&lt;/strong&gt; for the current setup (it will use the &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/rulebooks/infrastructure-cost-estimation" rel="noopener noreferrer"&gt;Infrastructure Cost Estimation&lt;/a&gt; &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/rulebooks" rel="noopener noreferrer"&gt;Rulebooks&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Generate a detailed report breaking down where resources (CPU, memory, storage, networking) are underutilized&lt;/li&gt;
&lt;li&gt;Provide actionable recommendations for cost optimization for example, rightsizing instances, adjusting auto scaling policies, or switching to more efficient pricing models&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/rulebooks" rel="noopener noreferrer"&gt;Rulebooks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/rulebooks/infrastructure-cost-estimation" rel="noopener noreferrer"&gt;Infrastructure Cost Estimation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/ecs/" rel="noopener noreferrer"&gt;ecs.docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;cloud watch.docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://httpd.apache.org/docs/2.4/programs/ab.html" rel="noopener noreferrer"&gt;Apache Bench&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://k6.io/" rel="noopener noreferrer"&gt;K6&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.artillery.io/" rel="noopener noreferrer"&gt;Artillary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Investigate Why an EC2 Application is Not Reachable</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Fri, 26 Jun 2026 17:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/investigate-why-an-ec2-application-is-not-reachable-32k7</link>
      <guid>https://dev.to/aws-builders/investigate-why-an-ec2-application-is-not-reachable-32k7</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;In this tutorial, we'll use Stakpak to investigate and fix an AWS networking incident where an application running on EC2 is healthy, but unreachable from the internet.&lt;/p&gt;

&lt;p&gt;Rather than manually inspecting EC2, VPC, subnet, route table, security group, network ACL, systemd, nginx, and application logs one by one, we'll use Stakpak to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Investigate the incident&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Identify the root cause&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apply the fix&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validate that the EC2 application becomes reachable again&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end of this tutorial, you'll learn how to use Stakpak to troubleshoot EC2 application reachability issues across both the instance and AWS networking layers. We will also sit &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;stakpak autopilot&lt;/a&gt; so it monitors our infrastructure 24/7, auto fix issues when it's safe, and pings us when human judgment is needed.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;You deploy a simple web application to an EC2 instance, and everything seems fine at first.&lt;/p&gt;

&lt;p&gt;The Terraform deployment succeeds.&lt;/p&gt;

&lt;p&gt;The EC2 instance is running.&lt;/p&gt;

&lt;p&gt;The instance has a public IP address.&lt;/p&gt;

&lt;p&gt;The security group appears to allow HTTP traffic.&lt;/p&gt;

&lt;p&gt;The application process is healthy.&lt;/p&gt;

&lt;p&gt;nginx is running.&lt;/p&gt;

&lt;p&gt;But when you try to access the application from the internet, the request times out.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -v --connect-timeout 5 --max-time 10 http://ec2-3-236-155-58.compute-1.amazonaws.com/health&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdlscso31nywvgax62wlt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdlscso31nywvgax62wlt.png" alt=" " width="800" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So you start the usual EC2 reachability debugging loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 describe-instances \
  --instance-ids i-0a2bf3df8a5769989 \
  --region us-east-1

aws ec2 describe-instance-status \
  --instance-ids i-0a2bf3df8a5769989 \
  --region us-east-1

aws ec2 describe-security-groups \
  --group-ids sg-0d133f86e2d08a392 \
  --region us-east-1

aws ec2 describe-route-tables \
  --filters Name=vpc-id,Values=vpc-001f8813b0d78f5e3 \
  --region us-east-1

aws ec2 describe-subnets \
  --subnet-ids subnet-07083683f7e1d2f09 \
  --region us-east-1

aws ec2 describe-network-acls \
  --filters Name=association.subnet-id,Values=subnet-07083683f7e1d2f09 \
  --region us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you start checking the instance&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ssm start-session \
  --target i-0a2bf3df8a5769989 \
  --region us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you have to figure out what actually matters.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Is the instance unhealthy?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is nginx down?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the app listening on the wrong interface?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the security group blocking traffic?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the subnet public?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the route table missing an internet route?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the public IP missing?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is another VPC networking control blocking the request?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AWS gives you the clues, but you still have to connect them.&lt;/p&gt;

&lt;h1&gt;
  
  
  Application
&lt;/h1&gt;

&lt;p&gt;The application is a simple web service running on an EC2 instance.&lt;/p&gt;

&lt;p&gt;It represents a small catalog preview service for the Northstar Commerce platform. &lt;/p&gt;

&lt;p&gt;The app exposes a health endpoint and a basic HTML page. It runs locally on the instance and is served to external clients through nginx.&lt;/p&gt;

&lt;p&gt;The main components are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;EC2 Instance: Runs the application and nginx.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Python Web Application: Provides the demo web service and health endpoint.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;systemd Service: Keeps the application process running.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;nginx: Listens on HTTP port 80 and proxies requests to the local app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security Group: Controls instance-level inbound and outbound traffic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subnet: Places the instance inside the VPC network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Route Table: Defines how traffic leaves the subnet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Internet Gateway: Provides internet connectivity for the VPC.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Network ACL: Applies subnet-level traffic rules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM Instance Profile: Allows access through AWS Systems Manager Session Manager.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The normal request flow is:&lt;/p&gt;

&lt;p&gt;A user sends an HTTP request to the EC2 public DNS name, traffic enters the VPC through the internet gateway, reaches the public subnet, passes the subnet and instance network controls, reaches nginx on port 80, nginx proxies the request to the local Python app on 127.0.0.1:8080, and the app returns a health response.The normal request flow is:&lt;/p&gt;

&lt;p&gt;A user sends an HTTP request to the EC2 public DNS name, traffic enters the VPC through the internet gateway, reaches the public subnet, passes the subnet and instance network controls, reaches nginx on port 80, nginx proxies the request to the local Python app on 127.0.0.1:8080, and the app returns a health response.&lt;/p&gt;

&lt;p&gt;The expected health endpoint is: &lt;code&gt;GET /health&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When the application is working correctly, it returns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
"status": "ok",
"service": "northstar-catalog-preview"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this incident, the application is healthy from inside the instance, but unreachable from the internet.&lt;/p&gt;

&lt;p&gt;Now that we understand the app, we can start troubleshooting.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud provider credentials configured&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open Stakpak and ask it to &lt;code&gt;investigate the EC2 issue&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now lets let it do its magic&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08dwjnwdc3c8i1dcmt28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08dwjnwdc3c8i1dcmt28.png" alt=" " width="620" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stakpak started by investigating why the EC2 /health endpoint was timing out by checking DNS, EC2 status, SSM access, security groups, route tables, NACLs, and local app health.&lt;/p&gt;

&lt;p&gt;It found that the EC2 instance and app were healthy, but the subnet Network ACL was blocking outbound ephemeral response traffic. The instance could receive traffic on port 80, but couldn’t send responses back to clients.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F273qtrc2lpd42gxn3k3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F273qtrc2lpd42gxn3k3j.png" alt=" " width="799" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Verified EC2 status checks were passing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirmed SSM access was online&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirmed nginx and the app were running locally&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verified local /health returned 200 OK&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirmed the security group and route table were correct&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Added an outbound NACL rule for TCP 1024-65535&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ran Terraform validation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applied the Terraform fix&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During apply, Terraform replaced the EC2 instance because the AL2023 AMI changed.&lt;/p&gt;

&lt;p&gt;After the fix, Stakpak verified that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The new instance i-04244ee1e1e4ef422 was running&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The new URL was &lt;a href="http://ec2-44-223-99-238.compute-1.amazonaws.com" rel="noopener noreferrer"&gt;http://ec2-44-223-99-238.compute-1.amazonaws.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The NACL allowed outbound ephemeral traffic&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/health returned HTTP/1.1 200 OK&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now everything is working🥳&lt;/p&gt;

&lt;p&gt;Let's ask it to set up &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Stakpak Autopilot&lt;/a&gt; so we avoid waking up at 3am because of an incident🤡&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Stakpak Autopilot monitors your apps 24/7, detects unexpected changes, fixes what’s safe, and only alerts you when it actually matters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Monitoring
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvk1ltvukie168qwg1v27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvk1ltvukie168qwg1v27.png" alt=" " width="798" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thats it, now it won't hunt us in our nightmares at 3 am.&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/configure-stakpak" rel="noopener noreferrer"&gt;Configure Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html" rel="noopener noreferrer"&gt;Configuration and credential file settings in the AWS CLI&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Autopilot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/handling-secrets" rel="noopener noreferrer"&gt;Handling Secrets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/warden-guardrails" rel="noopener noreferrer"&gt;Warden Guardrails&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>ec2</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Deploy your own OpenVPN Server on AWS with one prompt</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Thu, 25 Jun 2026 17:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/deploy-your-own-openvpn-server-on-aws-with-one-prompt-cjf</link>
      <guid>https://dev.to/aws-builders/deploy-your-own-openvpn-server-on-aws-with-one-prompt-cjf</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;Most of your AWS resources should be in private subnets for security reasons, but that also means they’re not directly accessible from the internet. To reach them securely, you need a VPN.&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll use OpenVPN on AWS to create a secure, encrypted connection to your private resources so your team can access them safely.&lt;/p&gt;

&lt;p&gt;Note: Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;

&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AWS resources in private subnets aren’t accessible from the internet by default.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Teams often try to solve this by opening ports or using bastion hosts, which increases security risks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These workarounds also add complexity to network management and access control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A VPN is needed to provide secure and simple access without exposing services publicly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Business Impact
&lt;/h1&gt;

&lt;p&gt;Without a VPN, secure remote access is harder, slower, and riskier. A VPN simplifies access and keeps development and operations running securely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But what is a VPN?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;VPN (Virtual Private Network)&lt;/strong&gt; is a secure, encrypted connection that allows you to access a private network over the internet as if you were physically inside it. It’s commonly used to safely reach internal servers, databases, or applications without exposing them to the public.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud provider credentials configured&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then just ask it to i want to install openvpn on aws so i can access my private resources&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here you chose your preferences&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq00smwnqd1908pw1ywbm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq00smwnqd1908pw1ywbm.png" alt=" " width="800" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I want to know more about the different architectures, so let's ask about it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0k8ozvszzw5m1ottxx2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0k8ozvszzw5m1ottxx2x.png" alt=" " width="800" height="741"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Here I chose &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Which AWS Region? EU West 1&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you have a VPC set ups? Yeah, i have a VPC&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How many people need VPN Access? Just one person needs access &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Client VPN or Self Hosted Open VPN or Open VPN from Market Place? Self Hosted Open VPN&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc16x0pmt6qvyecbd8rda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc16x0pmt6qvyecbd8rda.png" alt=" " width="799" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I will just tell it to continue with the defaults&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft2zfiye28kfdixgdmsy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft2zfiye28kfdixgdmsy5.png" alt=" " width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now we can review the commands and press Enter to continue it will be:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Get the VPC details&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the subnet details&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check the internet gateway&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Now it will create a security group for open vpn and get the latest Ubuntu version&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjfsn6ri7jpwut5scq6hv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjfsn6ri7jpwut5scq6hv.png" alt=" " width="799" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now it will create the security group rules, SSH key, and launch the ec2 instance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs8jq9bz85jdqu73on32t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs8jq9bz85jdqu73on32t.png" alt=" " width="799" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now that we have the EC2 ready, Stakpak will start setting up open VPN&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faonsfxb9yusy5kf9exrv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faonsfxb9yusy5kf9exrv.png" alt=" " width="800" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;That's it, now we can use OpenVPN&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6oe5kyt2gdtf7um5qkiy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6oe5kyt2gdtf7um5qkiy.png" alt=" " width="792" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;EC2 Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://openvpn.net/as-docs/general.html" rel="noopener noreferrer"&gt;Open VPN Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>vpn</category>
      <category>openvpn</category>
    </item>
    <item>
      <title>Migrate from NGINX to Caddy on AWS</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Wed, 24 Jun 2026 17:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/migrate-from-nginx-to-caddy-on-aws-k03</link>
      <guid>https://dev.to/aws-builders/migrate-from-nginx-to-caddy-on-aws-k03</guid>
      <description>&lt;h1&gt;
  
  
  Why Migrate to Caddy?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://caddyserver.com/" rel="noopener noreferrer"&gt;Caddy&lt;/a&gt; is open source, and it provides automatic HTTPS and certificate renewal out of the box, removing the need for Certbot or cron jobs. It offers secure defaults, simpler configuration, which makes it a lightweight and low maintenance replacement for nginx&lt;/p&gt;

&lt;p&gt;It acts as a reverse proxy, load balancer, and static file server out of the box, with secure defaults and minimal setup.&lt;/p&gt;

&lt;p&gt;Note: Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step by Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;Our current setup uses a single tier architecture on AWS to host a static HTML website. It runs on a t3.micro EC2 instance using nginx 1.28.0, serving files from &lt;code&gt;/usr/share/nginx/html/&lt;/code&gt;. The instance is part of the default VPC and resides in a public subnet, allowing direct internet access.&lt;/p&gt;

&lt;p&gt;Traffic is managed by a security group  with inbound rules open to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SSH (port 22)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTP (port 80)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTPS (port 443)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DNS is handled through Amazon Route 53, where an A record points the domain &lt;code&gt;migratingtocaddy.guku.io&lt;/code&gt; to the instance’s public IP. TLS certificates are issued by Let’s Encrypt and configured via Certbot with the nginx plugin, enabling automatic HTTPS redirection. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem with this architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Depends on manual Certbot setup (The renewal cron job can easily be forgotten)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;nginx configuration is unnecessarily complex&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No built in automation for TLS or reloads&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Higher maintenance for updates and security hardening&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's see how we can fix these problems with caddy&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Stakpak&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open your terminal and type "stakpak"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should configure your cloud credentials before opening stakpak, since Stakpak will use your existing machine setup to work&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Guide
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Then ask Stakpak to &lt;code&gt;Migrate from NGINX to Caddy with 0 downtime on AWS&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;First Stakpak will check what is our current set up on AWS&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdu700rmbwed3a8z9xdss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdu700rmbwed3a8z9xdss.png" alt=" " width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now, Stakpak recommended three zero down time strategies for the migration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faem02rwadlnpa4y95hx7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faem02rwadlnpa4y95hx7.png" alt=" " width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Since we don't want downtime because of the DNS access and TLS let's choose the second option&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzoo851r8aqzpip6iizze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzoo851r8aqzpip6iizze.png" alt=" " width="800" height="589"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now that we have the ALB and target groups, Stakpak will install Caddy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After installing Caddy Stakpak will copy the website content&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now wait for the health checks so we make sure Caddy is working fine&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97y1kl1w0xk1eqg7tvfg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97y1kl1w0xk1eqg7tvfg.png" alt=" " width="799" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now Stakpak is updates the DNS to point to the ALB&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thats it, we are ready to redirect the traffic to Caddy, and since we are using ALB we will be able to roll back if needed&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now it's working🥳&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj51kfw4s5aqpjv2a0vd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj51kfw4s5aqpjv2a0vd9.png" alt=" " width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ps: don't forget to check our new &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/slack-integration" rel="noopener noreferrer"&gt;Slack Integration&lt;/a&gt;👀&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;EC2 Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/vpc/" rel="noopener noreferrer"&gt;VPC Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html" rel="noopener noreferrer"&gt;Application Load Balancer Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/route53/" rel="noopener noreferrer"&gt;Route 53 Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://nginx.org/en/docs/" rel="noopener noreferrer"&gt;NGINX Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://caddyserver.com/docs/" rel="noopener noreferrer"&gt;Caddy Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>nginx</category>
      <category>caddy</category>
      <category>devops</category>
    </item>
    <item>
      <title>Free TLS with Caddy Web Server on AWS EC2 with Let's Encrypt</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Tue, 23 Jun 2026 17:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/free-tls-with-caddy-web-server-on-aws-ec2-with-lets-encrypt-2a3d</link>
      <guid>https://dev.to/aws-builders/free-tls-with-caddy-web-server-on-aws-ec2-with-lets-encrypt-2a3d</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi78234nwf86p1amcflqn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi78234nwf86p1amcflqn.png" alt=" " width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, we will see how to deploy a static website on AWS EC2 using Caddy web server with automatic HTTPS certificates from Let's Encrypt.                                                                                                                                                                                                              &lt;/p&gt;

&lt;p&gt;What you'll build:                                                                                                         &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Complete AWS infrastructure (VPC, subnet, security groups, EC2 instance)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS configuration via Route 53&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Caddy web server with automatic HTTPS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static website accessible via custom subdomain&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Production ready setup with HTTP to HTTPS redirect&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;all in less than 10 min&lt;/p&gt;

&lt;p&gt;Note: Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step by Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open your terminal and type "stakpak"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud provider credentials configured&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Turorial
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Then ask Stakpak to &lt;code&gt;install caddy on Ubuntu on EC2&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will start by checking the AWS creds and region&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsttbxu1toggyiz2g6eyr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsttbxu1toggyiz2g6eyr.png" alt=" " width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It will create:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Internet Gateway&lt;/li&gt;
&lt;li&gt;Attach Internet Gateway to VPC&lt;/li&gt;
&lt;li&gt;Create a public subnet&lt;/li&gt;
&lt;li&gt;Create a route table with an internet route&lt;/li&gt;
&lt;li&gt;Create security group (ports 22, 80, 443)&lt;/li&gt;
&lt;li&gt;Generate SSH key pair&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now it will create the EC2 instance &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now we drink coffee while the EC2 instance starts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now it will set the DNS and install Caddy, and test it&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F28i4890zjew8mi6kwws9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F28i4890zjew8mi6kwws9.png" alt=" " width="800" height="831"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it's working🥳&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx3j3tvnm4owvdjiltwoy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx3j3tvnm4owvdjiltwoy.png" alt=" " width="799" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;EC2 Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/vpc/" rel="noopener noreferrer"&gt;VPC Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/route53/" rel="noopener noreferrer"&gt;Route 53 Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://caddyserver.com/docs/" rel="noopener noreferrer"&gt;Caddy Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>caddy</category>
      <category>ec2</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Deploy Coolify on AWS &amp; Deploy Your App</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Mon, 22 Jun 2026 11:04:57 +0000</pubDate>
      <link>https://dev.to/aws-builders/deploy-coolify-on-aws-deploy-your-app-1k38</link>
      <guid>https://dev.to/aws-builders/deploy-coolify-on-aws-deploy-your-app-1k38</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://coolify.io/" rel="noopener noreferrer"&gt;Coolify&lt;/a&gt; lets you run your own platform similar to Heroku or Vercel, on your own infrastructure.&lt;/p&gt;

&lt;p&gt;In this tutorial, you will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Deploy Coolify on AWS EC2&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy a real application using Coolify&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test that everything is working&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then use Stakpak Autopilot to monitor and maintain it automatically&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;all with just one prompt&lt;/p&gt;

&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;Setting up Coolify on AWS is mostly manual steps and trial and error.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create the server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install dependencies&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the install script&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure everything is configured correctly&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A small mistake can leave you with a broken setup that’s hard to debug.&lt;/p&gt;

&lt;h1&gt;
  
  
  Application
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What the app does
&lt;/h2&gt;

&lt;p&gt;We’ll use a simple todo app built with Next.js and Turso.&lt;/p&gt;

&lt;p&gt;It:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;lets you create and delete tasks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;stores data in a Turso database (SQLite over HTTP)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;uses a modern stack (Next.js, Drizzle ORM, Tailwind)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a small app, but it’s enough to test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;deployment&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;database connectivity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;container behavior&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check the code source &lt;a href="https://github.com/mstfash/nextjs-turso-todos-template" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we understand the app, we can start deploying it&lt;/p&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/configure-stakpak" rel="noopener noreferrer"&gt;Configure Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/browser-extension" rel="noopener noreferrer"&gt;Browser Extension&lt;/a&gt;(Optional)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud provider credentials configured&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open stakpak ask it to &lt;code&gt;deploy my app on aws with coolify&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdea6seilamyshl2qt3k9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdea6seilamyshl2qt3k9.png" alt=" " width="620" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As you can see, it automatically find the coolify skill, let's press enter&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnsnaxx4e4xddykj47eod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnsnaxx4e4xddykj47eod.png" alt=" " width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now its asking us about which EC2 we want to use, lets choose t3.medium&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8yh28c3fcfnbngup4aod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8yh28c3fcfnbngup4aod.png" alt=" " width="799" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now it's asking us where we want to deploy our app, choose the closest region to your users&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb967mhej6071f7fuf8li.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb967mhej6071f7fuf8li.png" alt=" " width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now it's asking for the DB URL and Auth Token for our app&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwvdhedidi2aevdon050d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwvdhedidi2aevdon050d.png" alt=" " width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now, let's restrict SSH to our IP only for security&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2bl1e9b8msp32uubtnuc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2bl1e9b8msp32uubtnuc.png" alt=" " width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now that we have everything ready lets press enter&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsks5d0o9ug8pkqtr0ptg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsks5d0o9ug8pkqtr0ptg.png" alt=" " width="799" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now that Coolify is deployed, let's make an admin account&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxwrdtaa00e8hj7lcsz4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxwrdtaa00e8hj7lcsz4p.png" alt=" " width="799" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Then it configured Coolify by starting the reverse proxy and enabling API access&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It created a project and connected the GitHub repo as a new application&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It added the Turso database credentials as environment variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, it triggered the deployment, and Coolify built and launched the app automatically&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw48zp5o5fxl0dy1rs235.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw48zp5o5fxl0dy1rs235.png" alt=" " width="799" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fntcj316q69ywte6mhaqf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fntcj316q69ywte6mhaqf.png" alt=" " width="799" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now everything is working🥳&lt;/p&gt;

&lt;p&gt;Now, let's ask it to set up &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Stakpak Autopilot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: Stakpak Autopilot monitors your apps 24/7, detects unexpected changes, fixes what’s safe, and only alerts you when it actually matters.&lt;/p&gt;

&lt;h1&gt;
  
  
  Monitoring
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Prompt: &lt;code&gt;Set up stakpak autopilot to monitor the app&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frd54wkvr2ssr72fjllix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frd54wkvr2ssr72fjllix.png" alt=" " width="799" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2u0xllbaecxk8j4qlg98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2u0xllbaecxk8j4qlg98.png" alt=" " width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it!!&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Related Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/load-test-to-optimize-cloud-costs" rel="noopener noreferrer"&gt;Load Test to Optimize Cloud Costs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/migrate-a-next.js-app-from-vercel-to-aws" rel="noopener noreferrer"&gt;Migrate a Next.js App from Vercel to AWS&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/detect-and-fix-missing-backups-for-a-postgresql-db-in-production" rel="noopener noreferrer"&gt;Detect and Fix Missing Backups for a PostgreSQL DB in Production&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/containerize-a-python-app" rel="noopener noreferrer"&gt;Containerize a Python App&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and more...&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/configure-stakpak" rel="noopener noreferrer"&gt;Configure Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html" rel="noopener noreferrer"&gt;Configuration and credential file settings in the AWS CLI&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/coollabsio/coolify" rel="noopener noreferrer"&gt;Coolify&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://coolify.io/docs/get-started/installation" rel="noopener noreferrer"&gt;Installing Coolify&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Autopilot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/handling-secrets" rel="noopener noreferrer"&gt;Handling Secrets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>agents</category>
      <category>aws</category>
    </item>
    <item>
      <title>Investigate and Clean Up Unused Cloud Resources</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Fri, 19 Jun 2026 12:05:58 +0000</pubDate>
      <link>https://dev.to/aws-builders/investigate-and-clean-up-unused-cloud-resources-36oe</link>
      <guid>https://dev.to/aws-builders/investigate-and-clean-up-unused-cloud-resources-36oe</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;By the end of this tutorial, you'll learn how to use Stakpak to investigate zombie resources in a live AWS production account, identify every detached volume, idle load balancer, orphaned snapshot, and forgotten instance silently accruing charges, apply the right cleanups safely, validate that production stays healthy throughout, and configure &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Stakpak Autopilot&lt;/a&gt; to help detect similar resource sprawl automatically in the future.&lt;/p&gt;

&lt;p&gt;Note: Stakpak is open source, vendor neutral, and works with any model you choose.&lt;/p&gt;

&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;AWS environments naturally accumulate unused resources over time: detached volumes, old snapshots, idle load balancers, unassociated Elastic IPs, and forgotten S3 buckets.&lt;/p&gt;

&lt;p&gt;Finding them is easy. Determining whether they're safe to delete is not.&lt;/p&gt;

&lt;p&gt;A resource may look unused, but it could still support a production workload, backup process, or undocumented dependency. Safely cleaning up cloud waste requires connecting usage, ownership, and activity data across your environment before taking action.&lt;/p&gt;

&lt;h1&gt;
  
  
  Application
&lt;/h1&gt;

&lt;p&gt;Northstar Commerce is a B2B ecommerce platform running on AWS, with workloads spread across EKS, ECS Fargate, Lambda, and&lt;br&gt;
Vercel. The main components are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;storefront: Customer facing Next.js app on Vercel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;api-gateway: Public REST and GraphQL edge on EKS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;orders-service: Order lifecycle, Go on EKS, backed by Aurora PostgreSQL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;payments-service: Java on ECS Fargate, integrates with Stripe.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inventory-worker: Celery workers on EKS draining an SQS queue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;search-indexer: Rust Lambda keeping OpenSearch in sync.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;admin-console: React SPA on S3 behind CloudFront.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shared infrastructure includes an EKS cluster, an Aurora cluster, an ElastiCache Redis, an MSK cluster, an OpenSearch domain, ECR, Route 53, ACM, and Secrets Manager.&lt;/p&gt;

&lt;p&gt;Primary region is us-east-1, with us-west-2 as a disaster recovery region.&lt;/p&gt;

&lt;p&gt;Every workload in the catalog is healthy and serving traffic. None of the recent deploys touched infrastructure. &lt;/p&gt;

&lt;p&gt;The application itself is well understood and accounted for, but the AWS account it runs in has accumulated years of side projects, migrations, and experiments that nobody has audited. Anything we find outside of this catalog is a candidate for cleanup, as long as we can prove it isn't quietly supporting one of these workloads.&lt;/p&gt;

&lt;p&gt;Now that we understand the app and architecture, we can start investigating the account.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.dev/" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html" rel="noopener noreferrer"&gt;AWS credentials configured locally&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open Stakpak and ask it to &lt;code&gt;audit our AWS account for unused and zombie resources.&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now lets let it do its magic&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6d7972u7t3c9lo0sdrld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6d7972u7t3c9lo0sdrld.png" alt=" " width="620" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stakpak audited the AWS account for unused and zombie resources across compute, network, storage, IAM, data, and operational categories and found a small but real pool of recurring waste with no business value attached to any of it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpmaau29538oc2x8w6kyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpmaau29538oc2x8w6kyq.png" alt=" " width="799" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It identified ~$97/month of avoidable spend spread across 15 zombie resources in us-east-1, none tied to any active application. The signals came from EC2 state checks, EBS volume status, ELB target health, CloudWatch metrics for S3 and Lambda, IAM credential reports, and tag/name pattern analysis (*-OLD, -DEPRECATED, rakesh-test-, marketing-campaign-2022, loadtest-runner-2024-q1).&lt;/p&gt;

&lt;p&gt;Then it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terminated the stopped loadtest-runner-2024-q1 EC2 instance, abandoned since the Q1 2024 load test campaign&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deleted five unattached EBS volumes totaling 371 GB, including a 200 GB elasticsearch-data-node-3 orphan from the search-v1 deprecation and a 100 GB northstar-mysql-data-OLD volume&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deregistered the northstar-golden-image-v2-DEPRECATED AMI and removed its backing snapshot&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Released four unassociated Elastic IPs, including old-nat-gateway-eip from a decommissioned NAT and jenkins-static-ip from the Jenkins-to-GHA migration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deleted two abandoned ALBs (northstar-internal-tools with an empty target group, and a canary ALB with all targets unhealthy) and the northstar-legacy-clb Classic ELB tied to the deprecated checkout-v1 project&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Removed the unused openclaw-sg security group and its orphan openclaw-key key pair&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Emptied and deleted six zombie S3 buckets including northstar-marketing-campaign-2022, rakesh-test-bucket (employee left), tempdata-export, and northstar-checkout-v1-logs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cleaned up two empty CloudWatch log groups (/aws/lambda/feedbackboard-server, /aws/lambda/feedbackboard-warmer) left behind by deleted Lambda functions&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the changes were applied, Stakpak verified that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;All 15 zombie resources are gone&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No surviving production resources (bastion, api-canary, staging-app, prod-invoices bucket) were impacted&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;us-west-2 remained clean (only the default VPC, no workloads)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Projected monthly waste dropped from ~$97/month to $0, a 100% reduction on identified zombies&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now everything is cleaned up 🥳&lt;/p&gt;

&lt;p&gt;Now its asking us if we want to sit up &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Stakpak Autopilot&lt;/a&gt; to avoid having zombie resources&lt;/p&gt;

&lt;p&gt;Note: Stakpak Autopilot monitors your apps 24/7, detects unexpected changes, fixes what’s safe, and only alerts you when it actually matters.&lt;/p&gt;

&lt;h1&gt;
  
  
  Monitoring
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;First, it asks us about how often we want to run the checks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy4s0f869gukudhahxxi9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy4s0f869gukudhahxxi9.png" alt=" " width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Then it asks if we want Stakpak to take action&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6k5oatiwfl0b6s2nalzv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6k5oatiwfl0b6s2nalzv.png" alt=" " width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Then it asks about where we want to get alerted&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgji6nouedz812innlj1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgji6nouedz812innlj1b.png" alt=" " width="800" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwn3z3j6z1heguucesy3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwn3z3j6z1heguucesy3p.png" alt=" " width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;And that's it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffeq9qg71rwbzzlszq9sj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffeq9qg71rwbzzlszq9sj.png" alt=" " width="798" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Related Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/deploy-coolify-on-aws-and-deploy-your-app" rel="noopener noreferrer"&gt;Deploy Coolify on AWS &amp;amp; Deploy Your App&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/load-test-to-optimize-cloud-costs" rel="noopener noreferrer"&gt;Load Test to Optimize Cloud Costs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/investigate-why-aws-costs-suddenly-increased" rel="noopener noreferrer"&gt;Investigate Why AWS Costs Suddenly Increased&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and more ...&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/configure-stakpak" rel="noopener noreferrer"&gt;Configure Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html" rel="noopener noreferrer"&gt;Configuration and credential file settings in the AWS CLI&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Autopilot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/handling-secrets" rel="noopener noreferrer"&gt;Handling Secrets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/warden-guardrails" rel="noopener noreferrer"&gt;Warden Guardrails&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>finops</category>
      <category>devops</category>
    </item>
    <item>
      <title>Investigate Why AWS Costs Suddenly Increased</title>
      <dc:creator>Noureldin ehab</dc:creator>
      <pubDate>Thu, 18 Jun 2026 12:56:43 +0000</pubDate>
      <link>https://dev.to/aws-builders/investigate-why-aws-costs-suddenly-increased-5clk</link>
      <guid>https://dev.to/aws-builders/investigate-why-aws-costs-suddenly-increased-5clk</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;By the end of this tutorial, you'll learn how to use Stakpak to investigate zombie resources in a live AWS production account, identify every detached volume, idle load balancer, orphaned snapshot, and forgotten instance silently accruing&lt;br&gt;
charges, apply the right cleanups safely, validate that production stays healthy throughout, and configure &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Stakpak Autopilot&lt;/a&gt; to help detect similar resource sprawl automatically in the future.&lt;/p&gt;

&lt;p&gt;Note: Stakpak is open source and works with any model you choose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;Your AWS production application is healthy. The pipeline is green, the SLOs are green, the on call channel is quiet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But your FinOps lead just pinged the team:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We're $4,300 over budget this month and trending 35% above last. Nothing in the apps catalog has changed. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You start the usual cost investigation loop, Cost Explorer by service and by tag, VPCs and NAT Gateways, unattached EBS volumes, stale snapshots, idle Elastic IPs, VPC endpoints, RDS instances, CloudWatch log retention, S3 lifecycle policies, CloudTrail events.&lt;/p&gt;

&lt;p&gt;Cost Explorer shows the highest cost is from EC2, Other, EKS, and CloudWatch. The rest is scattered across eight services in chunks too small to feel urgent on their own. Tag breakdowns are messy because half the spend rolls up under (no tag) or Owner=unknown, and the biggest single CUR line item is a Fargate workload nobody on the current team recognizes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Is the $890 NAT Gateway data line the orphaned VPC nobody decommissioned, or production traffic that should be flowing through a VPC endpoint?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are the 1,400+ EBS snapshots load-bearing, or from a Lambda deprecated 18 months ago and never disabled?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the RDS instance tagged Environment=staging-old truly idle, or does some nightly job still touch it?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which of the 12 likely cost drivers, if any, would be the wrong thing to delete?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cost Explorer gives you part of the picture. AWS resource APIs give you the rest. But you still have to connect them, attribute them to owners, correlate them with utilization, and decide what is safe to remediate.&lt;/p&gt;

&lt;h1&gt;
  
  
  Application
&lt;/h1&gt;

&lt;p&gt;Northstar Commerce is a B2B ecommerce platform running on AWS, with workloads spread across EKS, ECS Fargate, Lambda, and Vercel. The main components are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;storefront: Customer facing Next.js app on Vercel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;api-gateway: Public REST and GraphQL edge on EKS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;orders-service: Order lifecycle, Go on EKS, backed by Aurora PostgreSQL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;payments-service: Java on ECS Fargate, integrates with Stripe.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;inventory-worker: Celery workers on EKS draining an SQS queue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;search-indexer: Rust Lambda keeping OpenSearch in sync.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;admin-console: React SPA on S3 behind CloudFront.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shared infrastructure includes an EKS cluster, an Aurora cluster, an ElastiCache Redis, an MSK cluster, an OpenSearch domain, ECR, Route 53, ACM, and Secrets Manager. &lt;/p&gt;

&lt;p&gt;Primary region is us-east-1, with us-west-2 as a disaster recovery region.&lt;/p&gt;

&lt;p&gt;Every workload in the catalog is healthy and serving traffic. None of the recent deploys touched infrastructure. Which is what makes a 35% cost jump suspicious: the bill is growing faster than the application is.&lt;/p&gt;

&lt;p&gt;Now that we understand the app and architecture, we can start investigating the cost spike.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step-by-Step Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.dev/" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html" rel="noopener noreferrer"&gt;AWS credentials configured locally&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open Stakpak and ask it to &lt;code&gt;investigate the cloud cost spike&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now lets let it do its magic&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpr31v2mvf2aatv3n0e1s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpr31v2mvf2aatv3n0e1s.png" alt=" " width="620" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stakpak traced the cost spike across billing, utilization, and infrastructure signals and identified multiple sources of unnecessary spend driving the 35% increase.&lt;/p&gt;

&lt;p&gt;It found that the $4,270 June overage came from 12 distinct cost drivers totaling ~$6,800/month of avoidable spend, none caused by application changes. The signals were spread across Cost Explorer deltas, tag anomalies (staging-old +5,854%, intern-summer-2025 +9,677%), CUR line items, CloudWatch utilization, and CloudTrail provenance.&lt;/p&gt;

&lt;p&gt;Then it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Deleted the orphaned legacy VPC and its NAT Gateway, abandoned since the 2024 EKS migration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terminated three m5.2xlarge legacy batch workers idling at 2% CPU&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deleted the forgotten eks-dev-intern cluster and its Fargate Spot profile, running since July 2025&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deleted the staging-old RDS instance after 30 days of zero connections&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Removed five unattached EBS volumes, three idle Elastic IPs, and 1,400+ stale snapshots from a deprecated 2023 backup Lambda&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Disabled GuardDuty in eu-west-1 and ap-southeast-1 where no workloads exist&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Added an S3 Gateway VPC endpoint to the production VPC, eliminating $890/month of NAT data processing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applied lifecycle rules to northstar-prod-edge-logs and 30-day retention to three "Never expire" log groups&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fixed cross-AZ traffic on orders-service&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deployed AWS Budgets with anomaly detection, tag-enforcement SCPs, and Config rules&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the changes were applied, Stakpak verified that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;All 12 driver resources are gone or reconfigured&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every production workload remained healthy with no SLO regressions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Projected run-rate dropped to ~$9,600/month, below the January baseline&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now everything is cleaned up 🥳&lt;/p&gt;

&lt;p&gt;Now its asking us if we want to sit up &lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;stakpak Autopilot&lt;/a&gt; to avoid future cost spikes&lt;/p&gt;

&lt;p&gt;Note: Stakpak Autopilot monitors your apps 24/7, detects unexpected changes, fixes what’s safe, and only alerts you when it actually matters.&lt;/p&gt;

&lt;h1&gt;
  
  
  Monitoring
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy5nmt8p6cerm6semyq3l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy5nmt8p6cerm6semyq3l.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Extra Resources:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Related Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/investigate-why-aws-costs-suddenly-increased" rel="noopener noreferrer"&gt;Investigate and Clean Up Unused Cloud Resources&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/deploy-coolify-on-aws-and-deploy-your-app" rel="noopener noreferrer"&gt;Deploy Coolify on AWS &amp;amp; Deploy Your App&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/tutorial/load-test-to-optimize-cloud-costs" rel="noopener noreferrer"&gt;Load Test to Optimize Cloud Costs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/install-stakpak" rel="noopener noreferrer"&gt;Install Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/get-started/configure-stakpak" rel="noopener noreferrer"&gt;Configure Stakpak&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html" rel="noopener noreferrer"&gt;Configuration and credential file settings in the AWS CLI&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/autopilot" rel="noopener noreferrer"&gt;Autopilot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/handling-secrets" rel="noopener noreferrer"&gt;Handling Secrets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stakpak.gitbook.io/docs/how-it-works/warden-guardrails" rel="noopener noreferrer"&gt;Warden Guardrails&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>cloudnative</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
