-1

Given any Lambda Function as input, what could be an efficient, objective, and automatic way to choose its optimal RAM configuration?

Ideally, the method/procedure should be language agnostic, it should ignore cold starts, and consider network fluctuations as well.

alexcasalboni
  • 1,726
  • 1
  • 16
  • 26

1 Answers1

2

I don't think there is any automatic way of deciding upon the RAM configurations.

You will have to do several executions (including some with cold starts) and see what is the range of RAM consumption and then add some buffer on top of it.

That's how we did it.

Regarding "Ideally, the method/procedure should be language agnostic", yes that should be true, although a point to note here would be that the actual RAM requirements/size would not be language agnostic, because different languages might need different memory footprint for doing the same task

Arafat Nalkhande
  • 11,078
  • 9
  • 39
  • 63
  • Thanks for your insights, Arafat. I guess my assumption was that you know the minimum RAM requirements of your Lambda Function (e.g. at least 256MB), and the real goal is finding the optimal configuration regarding costs and speed. Given that RAM also means CPU and networking capabilities, one could test all the configurations and assess the best "power configuration" manually. – alexcasalboni Apr 24 '17 at 22:05