Why serverless only?

I am curious why Apollo Server docs only show how to deploy it serverless. For example, Deploying with AWS Lambda. It’s kind of unusual because while developing we tend to always run it in a node server. What are the pros & cons? Is a Node deployment on AWS documented anywhere?

TIA

Node is a supported runtime in AWS Lambda.

Other kinds of deployments are probably not documented because they’re not really as consistent as serverless, and also probably a lot more steps.

But running locally is technically a deployment, so unless you’re asking about a specific way you’d like to deploy your service, it’s pretty hard to recommend a specific set of steps.

I agree that a straight Node.js deployment on an EC2 instance may be a little more work. Also, we need to front-end with a reverse-proxy to expose on port 80/442.

I was thinking something along these lines could be documented: How to deploy Node.js application on AWS with Github | by Sumant Mishra | Medium. Even better, if a Cloud Formation template could be provided.

P.S. Also not sure, from a performance perspective, if a heavily used API should be deployed as a lambda function.

No idea; we use AWS EKS, not EC2 or ECS, so all of my deployments are pretty much completely standardized around kubernetes.

Even our functions run in kubernetes via openfaas, so we have 0 workloads running outside of kubernetes.

Also not sure, from a performance perspective, if a heavily used API should be deployed as a lambda function.

Depends on how small it is and how resource intensive it is, I suppose. I would probably consult lambda’s limits & limitations.

1 Like