<?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: ntoledo319</title>
    <description>The latest articles on DEV Community by ntoledo319 (@ntoledo319).</description>
    <link>https://dev.to/ntoledo319</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%2F3997589%2F5bdd25d8-a708-4db4-8311-e27a6be8b853.png</url>
      <title>DEV Community: ntoledo319</title>
      <link>https://dev.to/ntoledo319</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ntoledo319"/>
    <language>en</language>
    <item>
      <title>Migrating AWS Lambda from Node.js 20 to 22 — every breaking change</title>
      <dc:creator>ntoledo319</dc:creator>
      <pubDate>Mon, 22 Jun 2026 21:11:30 +0000</pubDate>
      <link>https://dev.to/ntoledo319/migrating-aws-lambda-from-nodejs-20-to-22-every-breaking-change-8cp</link>
      <guid>https://dev.to/ntoledo319/migrating-aws-lambda-from-nodejs-20-to-22-every-breaking-change-8cp</guid>
      <description>&lt;p&gt;AWS deprecates Lambda runtimes on a 3-phase schedule: Phase 1 ends security patches, Phase 2 blocks &lt;strong&gt;creating&lt;/strong&gt; new functions, Phase 3 blocks &lt;strong&gt;updating&lt;/strong&gt; existing ones. Once Phase 3 hits, a frozen function's only path forward is a full redeploy on a new runtime. &lt;code&gt;nodejs20.x&lt;/code&gt; is on that track; &lt;code&gt;nodejs22.x&lt;/code&gt; is the target (LTS, maintained into 2027).&lt;/p&gt;

&lt;p&gt;Most code moves cleanly. Here's the set that doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;aws-sdk&lt;/code&gt; v2 is no longer bundled
&lt;/h2&gt;

&lt;p&gt;On &lt;code&gt;nodejs16.x&lt;/code&gt; and earlier, AWS preinstalled the v2 SDK. From &lt;code&gt;nodejs18.x&lt;/code&gt; onward, only &lt;strong&gt;v3&lt;/strong&gt; (&lt;code&gt;@aws-sdk/*&lt;/code&gt;) is bundled. So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Cannot find module 'aws-sdk'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fix: migrate to modular v3 clients, e.g. &lt;code&gt;const { S3Client } = require('@aws-sdk/client-s3')&lt;/code&gt;. v3 also returns promises directly (no &lt;code&gt;.promise()&lt;/code&gt;), and response shapes differ. Quick unblock: bundle &lt;code&gt;aws-sdk&lt;/code&gt; in your package (adds cold-start weight).&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Import assertions → import attributes
&lt;/h2&gt;

&lt;p&gt;Node 22 ships the finalized spec, which renamed &lt;code&gt;assert&lt;/code&gt; to &lt;code&gt;with&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Node 20 (valid)  -&amp;gt; Node 22 (broken)&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;cfg&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./config.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="nx"&gt;assert&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="c1"&gt;// Node 22 (valid)&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;cfg&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./config.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Native addons must be rebuilt
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: The module was compiled against a different Node.js version using NODE_MODULE_VERSION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Native modules (sharp, bcrypt, better-sqlite3…) are tied to the Node ABI. Rebuild on the target version, or bump to a release with a Node 22 prebuild. Dead packages (node-sass, fibers) must be replaced.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. OpenSSL 3
&lt;/h2&gt;

&lt;p&gt;Node 17+ ships OpenSSL 3, which rejects legacy hashing some older tooling relies on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: error:0308010C:digital envelope routines::unsupported
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fix: upgrade the tool (webpack 5, react-scripts 5+). &lt;code&gt;--openssl-legacy-provider&lt;/code&gt; is a stopgap only.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;code&gt;crypto.createCipher&lt;/code&gt; removed
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;crypto.createCipher&lt;/code&gt; / &lt;code&gt;createDecipher&lt;/code&gt; were removed in Node 22 — switch to &lt;code&gt;createCipheriv&lt;/code&gt; with an explicit key + IV (&lt;code&gt;scrypt&lt;/code&gt;/&lt;code&gt;pbkdf2&lt;/code&gt; + &lt;code&gt;randomBytes&lt;/code&gt;).&lt;/p&gt;




&lt;p&gt;I wrote an open-source CLI (&lt;code&gt;lambda-lifeline&lt;/code&gt;) that scans for all of these, codemods what's mechanical, patches your IaC, and stages a canary with rollback — plus a &lt;strong&gt;free browser scanner&lt;/strong&gt; that flags them in your config in ~30 seconds, nothing uploaded: &lt;strong&gt;&lt;a href="https://eolkits.com/scan" rel="noopener noreferrer"&gt;eolkits.com/scan&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Full guide with every case + captured output: &lt;strong&gt;&lt;a href="https://eolkits.com/blog/migrating-lambda-nodejs-20-to-22/" rel="noopener noreferrer"&gt;eolkits.com/blog/migrating-lambda-nodejs-20-to-22&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>lambda</category>
      <category>node</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Amazon Linux 2 is EOL on June 30, 2026 — here's everything that breaks</title>
      <dc:creator>ntoledo319</dc:creator>
      <pubDate>Mon, 22 Jun 2026 21:10:09 +0000</pubDate>
      <link>https://dev.to/ntoledo319/amazon-linux-2-is-eol-on-june-30-2026-heres-everything-that-breaks-3end</link>
      <guid>https://dev.to/ntoledo319/amazon-linux-2-is-eol-on-june-30-2026-heres-everything-that-breaks-3end</guid>
      <description>&lt;p&gt;Amazon Linux 2 reaches &lt;strong&gt;end of life on June 30, 2026&lt;/strong&gt;. After that: no security patches, no new AMIs, no extras updates. Anything still pinned to AL2 in a launch template, EKS node group, ECS task, Beanstalk platform, or container base image is running unpatched from that day on.&lt;/p&gt;

&lt;p&gt;Here's what actually changes when you move to Amazon Linux 2023 — the stuff that breaks boot scripts and CI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes on AL2023
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Amazon Linux 2&lt;/th&gt;
&lt;th&gt;Amazon Linux 2023&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Package manager&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yum&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;dnf&lt;/code&gt; (a &lt;code&gt;yum&lt;/code&gt; symlink remains)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Extras&lt;/td&gt;
&lt;td&gt;&lt;code&gt;amazon-linux-extras&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;removed&lt;/strong&gt; — packages are default, version-namespaced (&lt;code&gt;python3.11&lt;/code&gt;, &lt;code&gt;nginx1.24&lt;/code&gt;), or in SPAL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time sync&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ntpd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;chronyd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Firewall&lt;/td&gt;
&lt;td&gt;&lt;code&gt;iptables&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nftables&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python&lt;/td&gt;
&lt;td&gt;2.7 and 3.x&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.x only — no Python 2&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;glibc&lt;/td&gt;
&lt;td&gt;2.26&lt;/td&gt;
&lt;td&gt;2.34&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The errors you'll hit (and the fix)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;amazon-linux-extras: command not found&lt;/code&gt;&lt;/strong&gt; — it doesn't exist on AL2023. Install directly with &lt;code&gt;dnf&lt;/code&gt;, version-namespaced, or via SPAL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Failed to start ntpd.service: Unit ntpd.service not found&lt;/code&gt;&lt;/strong&gt; — use &lt;code&gt;chronyd&lt;/code&gt; instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/usr/bin/env: 'python2': No such file or directory&lt;/code&gt;&lt;/strong&gt; — there's no Python 2; port the script to &lt;code&gt;python3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Error: Unable to find a match: &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/strong&gt; — the package was renamed/version-namespaced/moved to SPAL. &lt;code&gt;dnf search&lt;/code&gt; for the real name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The migration checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inventory&lt;/strong&gt; every AL2 AMI, launch template, EKS node group, ECS task, Beanstalk platform, and container base image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rebuild the base AMI&lt;/strong&gt; on AL2023 (Packer / EC2 Image Builder).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Package manager&lt;/strong&gt;: move &lt;code&gt;yum&lt;/code&gt; usage to &lt;code&gt;dnf&lt;/code&gt;, drop &lt;code&gt;amazon-linux-extras&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Services&lt;/strong&gt;: &lt;code&gt;ntpd&lt;/code&gt; → &lt;code&gt;chronyd&lt;/code&gt;, &lt;code&gt;iptables&lt;/code&gt; → &lt;code&gt;nftables&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt;: port &lt;code&gt;python2&lt;/code&gt; scripts/shebangs to &lt;code&gt;python3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test&lt;/strong&gt; boot, app start, networking, and time sync on a canary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roll out&lt;/strong&gt; staged (5 → 25 → 50 → 100%) with a tested rollback.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;I got tired of grepping for this by hand, so I built a &lt;strong&gt;free scanner&lt;/strong&gt; — drop your Terraform / CloudFormation / Packer / Ansible into the browser and it flags every AL2 reference and the errors above, with the AWS source for each. Nothing is uploaded. &lt;strong&gt;&lt;a href="https://eolkits.com/scan" rel="noopener noreferrer"&gt;Try it free → eolkits.com/scan&lt;/a&gt;&lt;/strong&gt;. There's also an MIT CLI that does the codemods, and a paid audit if you want it done for you.&lt;/p&gt;

&lt;p&gt;Full checklist with the per-error fixes: &lt;strong&gt;&lt;a href="https://eolkits.com/amazon-linux-2-eol-checklist/" rel="noopener noreferrer"&gt;eolkits.com/amazon-linux-2-eol-checklist&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>linux</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
