AWS SAM CLI “ClassNotFoundException”

Intro

Again, I’ve run into an issue that took me forever to figure out and I couldn’t find a fix online so I’m just using this post to 1) store away the fix for myself in case I run into it again down the road and 2) Help anyone else who may have the same issue.

Problem

So, I’m running Fedora Linux (currently Fedora 39). With my day-job, I work a lot with AWS Lambdas so I try to do the debugging locally where I can (like any good developer). I had to do a fresh install of Fedora and in order to work with AWS SAM, you have to install Docker as well so it can run things inside it’s localized container. Since my fresh install, I could run a ** $sam build ** just fine but when I went to do the local invoke, it seems to launch fine till the debugger hit and it would throw the ** ClassNotFoundException ** (similar to what is mentioned here). I see some had a fix if you ran into this issue with Windows, but I couldn’t find any that had the issue running on Linux. I knew it had to do with the way I installed Docker, I just couldn’t figure it out.

Resolution

I had originally installed Docker by simply running ** $sudo dnf install docker ** but it turns out, that isn’t enough. I eventually found this link where there are specific instructions on installing Docker for Fedora and this ended up doing the trick. I don’t know which install specifically but I’m not sure it matters.

Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *