On my current project we use AWS Lambda functions for many things. Some of them are written on Java, some on Python. The most of these functions is already described in CloudFormation templates.

The values of used memory for these Lambda functions always were setted up manually and were chosen empirically. But we are not sure that these values are the most optimal for performance/cost evaluation. Are there any tools which could help to automate that process - testing and evaluation of Lambda function performance with different memory values and cost optimization (or at least for generating some reports for comparison)?