Configure Function Memory
Configure Command
Catalyst enables you to configure the memory for each of your functions. This memory will be allocated when the function is executed. You can choose a memory between 128 MB to 512 MB for any function.
The default memory assigned to a function is 256 MB. That is, if you don’t configure the memory, or if you had created a function before this feature was made available, the memory would be set to 256 MB automatically.
You can modify this value for any of your existing functions as per your requirements in the following way:
- Execute the following command from your function’s project directory.
The CLI will list all the functions you have created in your project, along with information of their current memory allocation.
-
Select one of the functions to configure, and press Enter .
-
Select the memory to allocate to the function from the available options, and press Enter .
The memory configuration for the function will be updated.
You can also directly configure a function’s memory by specifying the function’s name or ID along with the command like:
For example:
The CLI will then ask you to select a memory configuration in the same manner.
Configure Function Memory Options
You can also directly specify the memory you want allocated for a specific function using the
--memory <value> option for the catalyst functions:config command, followed by the
function’s name or ID.
This can be done in the following way:
For example, if you want to allocate 128 MB memory for a function named MailOrder , then execute the following command:
The CLI will ask you for confirmation. Enter Y and press Enter .
The memory configuration for the function will be updated.
Last Updated 2023-03-17 22:50:25 +0530 +0530
Yes
No
Send your feedback to us