AWS-SDK slowing down VSCode


Borislav Hadzhiev

Tue Feb 09 20211 min read


Photo by Zsofia Szalay

In the past couple of days I've been experiencing weird CPU spikes while writing code. Not all the time but specifically when I write in typescript and in projects that have aws-sdk installed.

The aws-sdk library is huge - 2.7MB minified, it includes a lot of typings and packages that can be auto imported, so when I type a keystroke I get like 150 suggestions.

The fix that I found is to temporary disable typescript auto import suggestions like:

"typescript.suggest.autoImports": false

This is not ideal since I rely on the auto imports feature in VSCode.

The next step is for me to migrate to aws-sdk v3 for javascript: Modular AWS SDK, however some of the packages around web identity and token credentials are not implemented yet.

Either way it's good to see that the AWS team is working on improving the developer experience, I had completely written off using aws-sdk on the frontend, however the modular packages will enable me to use more AWS services from the frontend directly, instead of writing useless lambda functions just to save on bundle size.

Use the search field on my Home Page to filter through my more than 1,000 articles.