DEV Community

Discussion on: Deep dive: finding the optimal resources allocation for your Lambda functions

Collapse
 
germanviscuso profile image
German Viscuso

Hi Alex. Awesome article! Given the obvious benefits, why is not AWS Lambda doing this optimization automatically for you (via opt-in for example)?

Collapse
 
alexcasalboni profile image
Alex Casalboni

Very good question, German :)

I can think of two good reasons why this is hard to provide as a managed solution:

1) you need to provide a valid input event for power-tuning, as every function requires its own specific payload; while this is something that can be automated, it's also very function-specific and domain-specific (Alexa skill vs S3 event vs Kinesis stream vs HTTP request)

2) power-tuning requires executing your functions in a real environment, with real downstream dependencies (databases, 3rd-party API's, legacy systems, etc.) so you need to be aware of those downstream services and prepare them for the load, otherwise you'll get noisy or inconsistent results

But never say never :)

Some comments have been hidden by the post's author - find out more