I think it’s possible, but personally, I won’t recommend it. You’d soon run into issues with the Lambda size too large, something like this: Gatsby 4 deploy fails - The function "__DSG" is larger than the 50MB limit. Please consider reducing it because of the Chrome binary.
I’d instead suggest you to deploy a standalone Netlify Function which would keep a lot of Next.js bloat away from your function bundle, allowing you some more space in your function.
By the way, Next.js API runs on Netlify Functions which runs on AWS Lambda.