amazon web services - AWS Lambda w/ API Gateway for Angular back-end? -


i'm still trying wrap mind around limitations of aws lambda, aws api gateway opens lot of options serving rest requests lambda.

i'm considering building web app in angular lambda serving back-end.

for simple crud stuff seems straightforward enough, authentication? able use passport within lambda user authentication?

yes, can pretty anything, store session on aws hosted database (rds, dynamo, etc). aware exactly buying lambda. has lot of trade-offs.

  • price: ec2 server costs fixed price per month, lambda has cost per call. cheaper depends on usage patterns. lambda cheaper when nobody using product, ec2 most likely cheaper usage increases.

  • scale: ec2 can scale (in many ways), it's more "manual" , "chunky" (you can run 1 server or 2, not 1.5). lambda has fine-grained scaling. don't worry it, have less control on it.

  • performance: lambda speed, , have little control. may have huge latencies in cases, spin new containers handle traffic. ec2 gives many more options performance tuning. (box size, on-box caches, using latest node.js, removing un-needed services box, being able run strace, etc) can pay excess capacity ensure low latency.

  • code: way code different in lambda vs ec2. lambda forces obey conventions best practice. ec2 allows violate them performance, or speed of development. lambda "black box" have less control , visibility when need troubleshoot.

  • setup: lambda easier setup , requires less knowledge overall. ec2 requires sysadmin , understand acronyms vpc, ebs, vpn, ami, etc.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -