<?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: Nitish Pandey</title>
    <description>The latest articles on DEV Community by Nitish Pandey (@nitish_pandey_c5361afcae9).</description>
    <link>https://dev.to/nitish_pandey_c5361afcae9</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%2F4068324%2F813dd0d5-f7e7-42d9-bd84-782cc0d8d45c.jpg</url>
      <title>DEV Community: Nitish Pandey</title>
      <link>https://dev.to/nitish_pandey_c5361afcae9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitish_pandey_c5361afcae9"/>
    <language>en</language>
    <item>
      <title>AWS RDS Connectivity Troubleshooting: A Practical Engineer's Guide</title>
      <dc:creator>Nitish Pandey</dc:creator>
      <pubDate>Wed, 12 Aug 2026 06:37:37 +0000</pubDate>
      <link>https://dev.to/nitish_pandey_c5361afcae9/aws-rds-connectivity-troubleshooting-a-practical-engineers-guide-48ia</link>
      <guid>https://dev.to/nitish_pandey_c5361afcae9/aws-rds-connectivity-troubleshooting-a-practical-engineers-guide-48ia</guid>
      <description>&lt;h2&gt;
  
  
  Your RDS instance is available. So why can't your application connect?
&lt;/h2&gt;

&lt;p&gt;Your application is running.&lt;/p&gt;

&lt;p&gt;Amazon RDS shows &lt;strong&gt;Available&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Your Security Group looks correct.&lt;/p&gt;

&lt;p&gt;And yet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application → RDS
             ❌ Connection failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is one of those AWS problems that looks simple but can consume a lot of troubleshooting time.&lt;/p&gt;

&lt;p&gt;The common mistake is treating it as only a &lt;strong&gt;database problem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In reality, RDS connectivity can fail at several layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application
    ↓
DNS
    ↓
Network
    ↓
Security Groups
    ↓
Route Tables
    ↓
Network ACLs
    ↓
Database Port
    ↓
RDS
    ↓
Authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal of this guide is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Find the exact layer where the connection fails instead of making random configuration changes.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🏗️ A Typical AWS Architecture
&lt;/h2&gt;

&lt;p&gt;A common private AWS architecture looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    AWS VPC
┌─────────────────────────────────────────────┐
│                                             │
│  Application Subnet       Database Subnet   │
│                                             │
│  ┌──────────────┐        ┌──────────────┐  │
│  │ EC2 / EKS    │        │     RDS      │  │
│  │ Application  │───────&amp;gt;│ PostgreSQL   │  │
│  └──────────────┘ TCP    └──────────────┘  │
│                   5432                      │
│                                             │
│       Security Groups                       │
│              │                              │
│       Route Tables                          │
│              │                              │
│       Network ACLs                          │
│                                             │
└─────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application has to successfully pass through multiple networking layers before it can communicate with RDS.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 Common Symptoms
&lt;/h2&gt;

&lt;p&gt;You may see errors such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;connection timed out
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;connection refused
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;could not connect to server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;no route to host
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;temporary failure in name resolution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;password authentication failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Access denied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These errors are &lt;strong&gt;not equivalent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS failure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is very different from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TCP connection timeout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which is different again from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Authentication failure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding the error category immediately narrows the investigation.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔎 My RDS Troubleshooting Flow
&lt;/h2&gt;

&lt;p&gt;I recommend troubleshooting in this order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. DNS
   ↓
2. Network reachability
   ↓
3. Security Groups
   ↓
4. Route Tables
   ↓
5. Network ACLs
   ↓
6. Database port
   ↓
7. RDS configuration
   ↓
8. Authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents unnecessary configuration changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  1️⃣ Start With DNS
&lt;/h2&gt;

&lt;p&gt;Before changing a Security Group, verify that the RDS endpoint resolves correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup &amp;lt;rds-endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig &amp;lt;rds-endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short &amp;lt;rds-endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short mydb.xxxxxx.ap-south-1.rds.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want to establish:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application host
      |
      v
RDS DNS endpoint
      |
      v
IP address
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  If DNS fails
&lt;/h3&gt;

&lt;p&gt;Investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC DNS support&lt;/li&gt;
&lt;li&gt;VPC DNS hostnames&lt;/li&gt;
&lt;li&gt;DNS resolver configuration&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/resolv.conf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Custom DNS configuration&lt;/li&gt;
&lt;li&gt;Network-level DNS restrictions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the hostname does not resolve, changing the RDS Security Group will not solve the problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  2️⃣ Test TCP Connectivity
&lt;/h2&gt;

&lt;p&gt;Once DNS works, test whether the application host can reach the database port.&lt;/p&gt;

&lt;h3&gt;
  
  
  PostgreSQL
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; 5432
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MySQL
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; 3306
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; mydb.xxxxxx.ap-south-1.rds.amazonaws.com 5432
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Connection succeeds
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TCP connectivity ✓
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The network path and port are reachable.&lt;/p&gt;

&lt;p&gt;Move to database-level troubleshooting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connection times out
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TCP connectivity ✗
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security Groups&lt;/li&gt;
&lt;li&gt;Route Tables&lt;/li&gt;
&lt;li&gt;Network ACLs&lt;/li&gt;
&lt;li&gt;Subnets&lt;/li&gt;
&lt;li&gt;Network path&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Connection refused
&lt;/h3&gt;

&lt;p&gt;Investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Database availability&lt;/li&gt;
&lt;li&gt;Incorrect port&lt;/li&gt;
&lt;li&gt;Incorrect endpoint&lt;/li&gt;
&lt;li&gt;Database configuration&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3️⃣ Check Security Groups
&lt;/h2&gt;

&lt;p&gt;Don't simply ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Is the Security Group open?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Does the RDS Security Group allow traffic from the application?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application EC2
     |
     | TCP 5432
     v
RDS Security Group
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A PostgreSQL RDS Security Group could contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type: PostgreSQL
Protocol: TCP
Port: 5432
Source: Application Security Group
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For MySQL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type: MySQL/Aurora
Protocol: TCP
Port: 3306
Source: Application Security Group
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Prefer Security Group references
&lt;/h3&gt;

&lt;p&gt;Prefer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source = sg-application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source = 0.0.0.0/0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;when the architecture allows it.&lt;/p&gt;

&lt;p&gt;Opening a database to the entire internet just because you're troubleshooting is a bad practice.&lt;/p&gt;




&lt;h2&gt;
  
  
  4️⃣ Check Route Tables
&lt;/h2&gt;

&lt;p&gt;A correct Security Group does &lt;strong&gt;not&lt;/strong&gt; guarantee network connectivity.&lt;/p&gt;

&lt;p&gt;You also need a valid network route.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application Subnet
        |
        v
   Route Table
        |
        v
    RDS Subnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a normal RDS deployment inside the same VPC, the VPC's local route should provide connectivity between the relevant subnets.&lt;/p&gt;

&lt;p&gt;For more complex architectures, investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC Peering&lt;/li&gt;
&lt;li&gt;Transit Gateway&lt;/li&gt;
&lt;li&gt;Cross-account networking&lt;/li&gt;
&lt;li&gt;Shared VPC architectures&lt;/li&gt;
&lt;li&gt;Custom route tables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the actual subnet associations rather than assuming the correct route table is attached.&lt;/p&gt;




&lt;h2&gt;
  
  
  5️⃣ Check Network ACLs
&lt;/h2&gt;

&lt;p&gt;Network ACLs are another layer that can be overlooked.&lt;/p&gt;

&lt;p&gt;Unlike Security Groups, Network ACLs are &lt;strong&gt;stateless&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means return traffic must also be permitted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application Subnet
       |
       v
Application NACL
       |
       v
RDS Subnet
       |
       v
RDS NACL
       |
       v
Return traffic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inbound rules&lt;/li&gt;
&lt;li&gt;Outbound rules&lt;/li&gt;
&lt;li&gt;Ephemeral ports&lt;/li&gt;
&lt;li&gt;Rule numbers&lt;/li&gt;
&lt;li&gt;Allow/deny ordering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don't modify NACLs randomly.&lt;/p&gt;

&lt;p&gt;First establish whether the NACL is actually affecting the connection path.&lt;/p&gt;




&lt;h2&gt;
  
  
  6️⃣ Verify RDS Configuration
&lt;/h2&gt;

&lt;p&gt;Once the network path looks correct, check the database itself.&lt;/p&gt;

&lt;p&gt;Verify:&lt;/p&gt;

&lt;h3&gt;
  
  
  Database engine
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PostgreSQL
MySQL
MariaDB
Aurora
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Database port
&lt;/h3&gt;

&lt;p&gt;PostgreSQL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5432
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MySQL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3306
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Endpoint
&lt;/h3&gt;

&lt;p&gt;Make sure the application is using the correct endpoint.&lt;/p&gt;

&lt;h3&gt;
  
  
  RDS status
&lt;/h3&gt;

&lt;p&gt;Confirm the instance or cluster is in an appropriate state such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Available
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DB subnet group&lt;/li&gt;
&lt;li&gt;Parameter group&lt;/li&gt;
&lt;li&gt;Cluster/instance configuration&lt;/li&gt;
&lt;li&gt;Public/private accessibility&lt;/li&gt;
&lt;li&gt;SSL/TLS requirements&lt;/li&gt;
&lt;li&gt;Recent configuration changes&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7️⃣ Test Database Authentication
&lt;/h2&gt;

&lt;p&gt;If TCP connectivity works, move to the database layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  PostgreSQL
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;psql &lt;span class="nt"&gt;-h&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; &lt;span class="nt"&gt;-U&lt;/span&gt; &amp;lt;username&amp;gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &amp;lt;database&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MySQL
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mysql &lt;span class="nt"&gt;-h&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; &lt;span class="nt"&gt;-u&lt;/span&gt; &amp;lt;username&amp;gt; &lt;span class="nt"&gt;-p&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, you might receive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;password authentication failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Access denied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's useful information.&lt;/p&gt;

&lt;p&gt;It means the network connection may already be working.&lt;/p&gt;

&lt;p&gt;Now investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Username&lt;/li&gt;
&lt;li&gt;Password&lt;/li&gt;
&lt;li&gt;Database name&lt;/li&gt;
&lt;li&gt;SSL/TLS&lt;/li&gt;
&lt;li&gt;Authentication method&lt;/li&gt;
&lt;li&gt;Application secrets&lt;/li&gt;
&lt;li&gt;IAM database authentication, if configured&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐘 PostgreSQL Example
&lt;/h2&gt;

&lt;p&gt;PostgreSQL commonly uses TCP port &lt;code&gt;5432&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First test the port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; 5432
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then test the actual database connection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;psql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-h&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 5432 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-U&lt;/span&gt; &amp;lt;username&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &amp;lt;database&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The troubleshooting path becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS
 ↓
TCP 5432
 ↓
Security Group
 ↓
Route
 ↓
Network ACL
 ↓
PostgreSQL
 ↓
Username
 ↓
Password
 ↓
Database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🐬 MySQL Example
&lt;/h2&gt;

&lt;p&gt;MySQL commonly uses TCP port &lt;code&gt;3306&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; 3306
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mysql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-h&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-P&lt;/span&gt; 3306 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-u&lt;/span&gt; &amp;lt;username&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The troubleshooting sequence remains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS
 ↓
TCP 3306
 ↓
Security Group
 ↓
Route
 ↓
Network ACL
 ↓
MySQL
 ↓
Authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚠️ Common Failure Scenarios
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scenario 1 — DNS Does Not Resolve
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS
 ↓
❌
RDS endpoint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC DNS settings&lt;/li&gt;
&lt;li&gt;Resolver configuration&lt;/li&gt;
&lt;li&gt;DNS endpoint spelling&lt;/li&gt;
&lt;li&gt;Custom DNS servers&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Scenario 2 — DNS Works but TCP Times Out
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS       ✓
TCP       ✗
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Focus on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Security Group
Route Table
Network ACL
Subnet
Network path
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Scenario 3 — TCP Works but Login Fails
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS       ✓
TCP       ✓
Login     ✗
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now investigate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Username
Password
Database
SSL/TLS
Authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't keep changing networking rules when the network is already working.&lt;/p&gt;




&lt;h3&gt;
  
  
  Scenario 4 — Wrong Database Port
&lt;/h3&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application → 5432
RDS Engine  → MySQL / 3306
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application is connecting to the wrong port.&lt;/p&gt;

&lt;p&gt;Always verify the actual database engine and port.&lt;/p&gt;




&lt;h3&gt;
  
  
  Scenario 5 — RDS Is Private
&lt;/h3&gt;

&lt;p&gt;A common architecture is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Internet
   |
   v
ALB
   |
   v
Application
   |
   v
Private RDS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're attempting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Laptop
   |
   v
Internet
   |
   v
Private RDS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the problem may be the network architecture rather than the database.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Security Considerations
&lt;/h2&gt;

&lt;p&gt;Troubleshooting should never become an excuse for creating security problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  ❌ Avoid
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RDS
 ↓
0.0.0.0/0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ✅ Prefer
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application SG
       ↓
    RDS SG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep databases private where appropriate.&lt;/li&gt;
&lt;li&gt;Use encryption at rest.&lt;/li&gt;
&lt;li&gt;Use TLS for database connections.&lt;/li&gt;
&lt;li&gt;Store credentials in AWS Secrets Manager or another appropriate secrets-management solution.&lt;/li&gt;
&lt;li&gt;Never commit database passwords to Git.&lt;/li&gt;
&lt;li&gt;Never include credentials in screenshots or public troubleshooting posts.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧪 Useful Linux Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  DNS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup &amp;lt;rds-endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig &amp;lt;rds-endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short &amp;lt;rds-endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  TCP Connectivity
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; 5432
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &lt;span class="nt"&gt;-zv&lt;/span&gt; &amp;lt;rds-endpoint&amp;gt; 3306
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Routing
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip route
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Network Interfaces
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip addr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  DNS Configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands help answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Who am I?
Where am I?
How is traffic routed?
Which DNS resolver am I using?
Can I reach the database port?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ✅ RDS Troubleshooting Checklist
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ ] Confirm the exact error
[ ] Confirm the application host
[ ] Confirm the RDS endpoint
[ ] Confirm database engine
[ ] Confirm database port
[ ] Test DNS resolution
[ ] Test TCP connectivity
[ ] Check application Security Group
[ ] Check RDS Security Group
[ ] Verify RDS inbound rules
[ ] Verify route tables
[ ] Check Network ACLs
[ ] Verify subnet configuration
[ ] Confirm RDS status
[ ] Test database login
[ ] Verify username
[ ] Verify password
[ ] Verify database name
[ ] Check SSL/TLS requirements
[ ] Check application configuration
[ ] Check recent network changes
[ ] Validate the fix
[ ] Document the root cause
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 The Biggest Lesson
&lt;/h2&gt;

&lt;p&gt;The most important lesson isn't a particular AWS command.&lt;/p&gt;

&lt;p&gt;It's the troubleshooting mindset.&lt;/p&gt;

&lt;p&gt;When someone says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The application can't connect to RDS."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don't immediately ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What's wrong with the Security Group?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"At which exact layer does the connection fail?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Use this model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             RDS Connectivity

                    │
                    ▼
                  DNS
                    │
                    ▼
               Network
                    │
                    ▼
            Security Groups
                    │
                    ▼
              Route Tables
                    │
                    ▼
              Network ACLs
                    │
                    ▼
              Database Port
                    │
                    ▼
                   RDS
                    │
                    ▼
             Authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you identify the failing layer, the number of possible causes becomes much smaller.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Good cloud troubleshooting isn't about memorizing hundreds of commands.&lt;/p&gt;

&lt;p&gt;It's about building a repeatable investigation process.&lt;/p&gt;

&lt;p&gt;My preferred approach is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observe → Isolate → Test → Fix → Validate → Prevent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And most importantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don't make five changes at once.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you change the Security Group, route table, NACL, application configuration, and database settings simultaneously, you may fix the problem—but you won't know why.&lt;/p&gt;

&lt;p&gt;Make controlled changes, validate each step, and document what you learn.&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 More AWS Production Troubleshooting
&lt;/h2&gt;

&lt;p&gt;I'm building a public collection of practical AWS troubleshooting scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/pandeynitish23/aws-production-troubleshooting" rel="noopener noreferrer"&gt;AWS ALB 504 Gateway Timeout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;RDS connectivity&lt;/li&gt;
&lt;li&gt;EC2 application failures&lt;/li&gt;
&lt;li&gt;Auto Scaling configuration drift&lt;/li&gt;
&lt;li&gt;CloudWatch investigations&lt;/li&gt;
&lt;li&gt;VPC and Security Group troubleshooting&lt;/li&gt;
&lt;li&gt;EKS troubleshooting&lt;/li&gt;
&lt;li&gt;ECR → EKS deployments&lt;/li&gt;
&lt;li&gt;Terraform production troubleshooting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Turn real production troubleshooting experience into practical knowledge that other cloud engineers can use.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  👨‍💻 About Me
&lt;/h2&gt;

&lt;p&gt;I'm an AWS Cloud Engineer working with cloud infrastructure, automation, Kubernetes, Terraform, and production troubleshooting.&lt;/p&gt;

&lt;p&gt;I'm also exploring the intersection of &lt;strong&gt;AWS, AI infrastructure, and AIOps&lt;/strong&gt; and documenting what I learn along the way.&lt;/p&gt;

&lt;p&gt;If you're working with AWS and have encountered an interesting production issue, I'd love to hear about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the strangest AWS connectivity problem you've had to troubleshoot?&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #AmazonRDS #AWSCloud #CloudEngineering #DevOps #AWSNetworking #CloudComputing #SRE #Terraform #Kubernetes
&lt;/h1&gt;

</description>
      <category>aws</category>
      <category>database</category>
      <category>infrastructure</category>
      <category>networking</category>
    </item>
    <item>
      <title>Biryani CSS Art — India's Soul in Every Grain 🍛</title>
      <dc:creator>Nitish Pandey</dc:creator>
      <pubDate>Sat, 08 Aug 2026 05:37:58 +0000</pubDate>
      <link>https://dev.to/nitish_pandey_c5361afcae9/biryani-css-art-indias-soul-in-every-grain-17hb</link>
      <guid>https://dev.to/nitish_pandey_c5361afcae9/biryani-css-art-indias-soul-in-every-grain-17hb</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2026-07-29"&gt;Frontend Challenge - Comfort Food Edition, CSS Art&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;I chose to build a classic &lt;strong&gt;Dum Biryani&lt;/strong&gt; — the ultimate comfort food! 🍛&lt;br&gt;
There is nothing quite like opening a steaming handi of biryani and seeing the rich, saffron-colored rice dotted with fried onions, mint, and spices. It's a dish that brings people together and feels like a warm hug, making it the perfect inspiration for the Comfort Food challenge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Here is my CSS Art representation of a traditional Biryani Handi! &lt;br&gt;
I built this primarily using vanilla CSS to create the realistic clay texture of the pot, the individual grains of rice, the steam animations, and the garnishes. I added a tiny bit of JavaScript just for a subtle mouse-parallax tilt effect and a saffron sparkle when you click the pot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pandeynitish23/dev_css_chalange/" rel="noopener noreferrer"&gt;https://github.com/pandeynitish23/dev_css_chalange/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev-css-chalange.nitishkumar-nk-np.workers.dev/" rel="noopener noreferrer"&gt;https://dev-css-chalange.nitishkumar-nk-np.workers.dev/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;Building this was a really fun exercise in CSS gradients and positioning! &lt;br&gt;
&lt;strong&gt;What I'm most proud of:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Clay Handi:&lt;/strong&gt; I used layered radial and linear gradients along with inset box shadows to give the pot a realistic, 3D clay texture with lighting highlights.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Rice &amp;amp; Garnishes:&lt;/strong&gt; Creating individual rice grains, mint leaves, and onion crisps using CSS border-radius and positioning was tedious but incredibly rewarding when it all came together.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Atmosphere:&lt;/strong&gt; Adding animated steam and floating background spice particles helped bring the scene to life and make it feel hot and fresh.
It was a great challenge keeping the JavaScript minimal and relying on pure CSS for the heavy lifting of the art itself!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>frontendchallenge</category>
      <category>devchallenge</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I Update Applications in an AWS Auto Scaling Group Using Golden AMIs</title>
      <dc:creator>Nitish Pandey</dc:creator>
      <pubDate>Sat, 08 Aug 2026 05:08:05 +0000</pubDate>
      <link>https://dev.to/nitish_pandey_c5361afcae9/how-i-update-applications-in-an-aws-auto-scaling-group-using-golden-amis-72g</link>
      <guid>https://dev.to/nitish_pandey_c5361afcae9/how-i-update-applications-in-an-aws-auto-scaling-group-using-golden-amis-72g</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;If you've ever managed applications running in an Amazon EC2 Auto Scaling Group, you've probably wondered what's the safest way to deploy updates without manually logging into every instance.&lt;/p&gt;

&lt;p&gt;Over the last few months, I've been using a --Golden AMI-- approach for application deployments. It has made deployments much more consistent, easier to roll back, and reduced the chances of configuration drift.&lt;/p&gt;

&lt;p&gt;In this article, I'll share the process I follow.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why I Prefer Golden AMIs
&lt;/h1&gt;

&lt;p&gt;There are many ways to deploy applications on EC2.&lt;/p&gt;

&lt;p&gt;You can SSH into instances and update them manually, but over time that creates inconsistencies because every server ends up slightly different.&lt;/p&gt;

&lt;p&gt;Instead, I update one EC2 instance, verify everything, create a new AMI, and let the Auto Scaling Group launch new instances from that image.&lt;/p&gt;

&lt;p&gt;That way every instance is identical.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1 – Prepare a Working EC2 Instance
&lt;/h1&gt;

&lt;p&gt;I usually follow one of these approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detach an EC2 instance from the Auto Scaling Group without reducing the desired capacity.&lt;/li&gt;
&lt;li&gt;Or launch a temporary EC2 instance from the current production AMI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gives me a safe environment to make changes without affecting live traffic.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2 – Deploy the Changes
&lt;/h1&gt;

&lt;p&gt;Once connected to the instance, I:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull the latest application code&lt;/li&gt;
&lt;li&gt;Update configuration if needed&lt;/li&gt;
&lt;li&gt;Restart the application&lt;/li&gt;
&lt;li&gt;Verify the application starts correctly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;/p&gt;




&lt;p&gt;git pull origin main&lt;/p&gt;

&lt;h2&gt;
  
  
  sudo systemctl restart myapp
&lt;/h2&gt;

&lt;h1&gt;
  
  
  Step 3 – Verify Everything
&lt;/h1&gt;

&lt;p&gt;Before creating an AMI, I always make sure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The application is running&lt;/li&gt;
&lt;li&gt;APIs respond correctly&lt;/li&gt;
&lt;li&gt;Services are healthy&lt;/li&gt;
&lt;li&gt;Logs don't show unexpected errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's much better to spend a few extra minutes testing than discover a problem after every instance has been updated.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4 – Create a Golden AMI
&lt;/h1&gt;

&lt;p&gt;After everything looks good, I create a new AMI from the updated instance.&lt;/p&gt;

&lt;p&gt;I also use a meaningful naming convention such as:&lt;/p&gt;




&lt;h2&gt;
  
  
  myapp-prod-v2
&lt;/h2&gt;

&lt;p&gt;This makes future deployments and rollbacks easier to manage.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5 – Update the Launch Template
&lt;/h1&gt;

&lt;p&gt;Next, I create a new Launch Template version using the new AMI and set it as the default version.&lt;/p&gt;

&lt;p&gt;Now the Auto Scaling Group knows which image should be used for new instances.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 6 – Start an Instance Refresh
&lt;/h1&gt;

&lt;p&gt;This is probably my favorite part because AWS handles most of the work.&lt;/p&gt;

&lt;p&gt;The Auto Scaling Group:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launches a new instance&lt;/li&gt;
&lt;li&gt;Waits for health checks&lt;/li&gt;
&lt;li&gt;Terminates one old instance&lt;/li&gt;
&lt;li&gt;Repeats until every instance has been replaced&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The deployment happens gradually, so users aren't affected.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7 – Final Checks
&lt;/h1&gt;

&lt;p&gt;Once the refresh finishes, I verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Target Group health&lt;/li&gt;
&lt;li&gt;CloudWatch metrics&lt;/li&gt;
&lt;li&gt;Application functionality&lt;/li&gt;
&lt;li&gt;Auto Scaling Group status&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything looks good, I terminate the temporary EC2 instance.&lt;/p&gt;

&lt;h1&gt;
  
  
  What If Something Goes Wrong?
&lt;/h1&gt;

&lt;p&gt;One of the biggest benefits of this approach is how easy rollback becomes.&lt;/p&gt;

&lt;p&gt;I simply change the Launch Template back to the previous version and start another Instance Refresh.&lt;/p&gt;

&lt;p&gt;AWS gradually replaces the instances with the previous working AMI.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;This is the deployment process I've found most reliable for applications running on EC2 Auto Scaling Groups. It keeps deployments consistent, reduces manual work, and makes rolling back much less stressful when something doesn't go as planned.&lt;/p&gt;

&lt;p&gt;I'm always interested in learning different approaches, so if you manage applications on EC2, how do you handle deployments? Do you use Golden AMIs, CodeDeploy, containers, or something else?&lt;/p&gt;

</description>
      <category>automation</category>
      <category>aws</category>
      <category>devops</category>
      <category>infrastructure</category>
    </item>
  </channel>
</rss>
