top | item 34474448

(no title)

astuyvenberg | 3 years ago

It's typically fine - AWS bills by GB/s (in ms), not by number of functions in an account.

There are limits to the number of functions per account, and number of resources per CloudFormation stack (etc); but within those parameters it's usually a good idea to use one function for a specific controller or action. This allows you to limit IAM permissions, configure memory/CPU, and define associated resources at a per-controller level.

discuss

order

bigfoot675|3 years ago

You will definitely run into more cold starts though, if that is a consideration for your project

philwelch|3 years ago

A serverless function that never cold-starts is just a container.

aa_memon|3 years ago

I'm guessing it also helps keep deploys small (atomic?) when a controller method changes. The unmodified lambdas stay untouched.

foolfoolz|3 years ago

this makes logging much more difficult to search through