AWS Lambda, C#, and Serverless tool: Code is deploying, but only getting "Internal Server Error."

Hi, everyone. I’m trying to deploy a C# project to AWS Lambda using Serverless. (If it matters, I’m using an Ubuntu 16.04 machine, and I’ve also had the same experience using an 18.04 container).

I started out by following this tutorial (part 2), and everything seemed to be going fine until I got to the “API Gateway console” section in part 2. It says “In API Gateway, you’ll see dev-foo listed under the APIs section.” It’s not listed there. I’m also not seeing any indication that the code is anywhere in my account from looking through the AWS console, though I don’t really know where to look for that, exactly.

There was no indication of any error on running the “deploy” command, and the terminal output did give me an endpoint URL, which, as the tutorial says, will return “Internal server error.”

I’ve looked through the docs on Serverless’s website, but I haven’t found anything addressing this. (There’s also nothing about going to the API Gateway.)

I’m not finding any logs in Cloudwatch for any activity at all.

It does work if I use Node.js-- It’s only C# that’s failing. (Though, I’m also getting no indication that the code is anywhere in my account with Node.js, either.)

I haven’t had much look searching the internet for this.

Would anybody happen to know how to get this to get past the Internal Server Error? Or at least see what the error is from my AWS Console?


Hi, I would try to take a look at your cloudformation (you can find it in your aws console), it should have a stack with your resources created by serverless framework + you can open labda console as well.
Maybe you have a few aws accounts and serverless deploys to another one ? :slight_smile:

There’s nothing in my CloudFormation page. It says “Stacks (0).” There’s also nothing in the Lambda page-- It has a “Get Started” page.

I also have working Node.js functions, and those aren’t listed there, either.

Okay, part of this mystery is solved-- The “Stacks (0)” and nothing listed in the Lambda page is because I’m apparently working on two different servers, which I suppose is pretty similar to what you said, though they’re not two different accounts. I’m not 100% sure how that happened, but noticing the droplist in the upper-right corner just resolved a lot of confusion for me. (I never expected that.)

I still haven’t got the C# working, but my superiors informed me that they’d rather do Node.js instead. I’ll leave this here in case anybody else wants to comment for people in the future coming by this post.

Update: And I just realized that’s why nothing was listed in the API Gateway page, either, so, I suppose this is solved.

Update 2: I forgot to say thanks to Moro. Thanks, Moro!

Hi, no problem happy to help. If I’m not mistaken - you have different regions for different users, that’s why you couldn’t see any stacks + API gateway configs, right? As for C#, can’t help you because I work just with Node.js, hope somebody will write how to fix your C# deployment.
p.s. I would recommend adding a region to your local ./.aws/config, otherwise, you will have the same problem in the future + it’s easy to leave some resources in a different region

[profile your-profile]
output = json
region = eu-west-1