How to upgrade CDK to latest version
Ibrahim Cesar

Ibrahim Cesar @ibrahimcesar

About: ⚡️ Enterprise Solutions Architect @ Amazon Web Services (AWS)

Location:
São Paulo, Brazil
Joined:
Jul 2, 2019

How to upgrade CDK to latest version

Publish Date: Jan 28 '21
32 5

CDK is updating all the time. Which is great, the tool is expanding, gaining more features. Take a look of the timestamps in their GitHub releases page. I wonder if Matt Coulter find a single weekend to chill.

I once made a quick Proof of Concept and after two days, I updated my current installed version and my PoC simply stopped work. Good grief is all remote these days. And for new projects I always want to use the latest stable version in the docs – but I also get:

Upgrade recommended

And somehow I forgot again and again the command. After tried the usual suspects cdk upgrade, cdk update or cdk --upgrade, I had to research again. One. More. Time. I'm writing to help me remember.

The command to upgrade your CDK version is:



npm install -g aws-cdk@latest


Enter fullscreen mode Exit fullscreen mode

Or if you are a Yarn folk:



yarn global upgrade aws-cdk


Enter fullscreen mode Exit fullscreen mode

#AWSWhishlist: Your buddy Amplify CLI has a amplify upgrade 👀 ... Your move.


Cover photo by Jon Moore on Unsplash. I searched for contructs and this was the best I could find.

Comments 5 total

  • Ibrahim Cesar
    Ibrahim CesarJan 28, 2021

    Thanks! Is a little annoying sometimes!

  • 🚀 Vu Dao 🚀
    🚀 Vu Dao 🚀 Mar 25, 2021

    Upgrade CDK version does not solve problems of outdated dependency services between the aws-cdk.core and other modules. Use following commands to solve the prolbem

    pip list --local --outdated |grep cdk  | awk '{print $1}' > requirements.txt
    pip install --upgrade -r requirements.txt
    
    Enter fullscreen mode Exit fullscreen mode
    • thoroc
      thorocApr 21, 2023

      How is using Pip going to solve npm related issues?

  • Ofelia Johnson
    Ofelia JohnsonJun 17, 2025

    To upgrade the AWS CDK to the latest version, simply run npm install -g aws-cdk (for Node.js users), or use the appropriate command for your language. CDK evolves rapidly—just check the release timestamps on GitHub! It’s like the team never sleeps (poor Matt Coulter!). Staying updated ensures access to the newest features and improvements. And while you’re at it, take a break and visit the Magis TV website—a great free streaming app you can download for PC and enjoy while your deployments run.

Add comment