DEV Community

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

Collapse
 
ricardo1980 profile image
Ricardo Ruiz Lopez

Great article! Thanks a lot.
When using amplify, we have cloud formation templates generated by amplify that we can customised if we want (very often I do that to add new permissions).
How should I hardcode the power I need in this scenario? Because my entire system should be described using these templates as far as I know.
Thanks a lot.

Collapse
 
alexcasalboni profile image
Alex Casalboni

Hi Ricardo, very good question :)

You should be able to edit (or add) the MemorySize property of your function. It's always an integer value in MB and you can customize it for each individual function. CloudFormation doc here.

I don't think you can do this with Amplify templates, but when using AWS SAM you can also customize the memory of all the functions in your template using the Globals section.

Collapse
 
rosswilliams profile image
rosswilliams

With amplify your can directly modify the cloud formation template for lambda functions and the changes will be preserved

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