
In the Lambda resource model, you choose the amount of memory you want for your function, and are allocated proportional CPU power and other resources.
An increase in memory size configures an equivalent increase in CPU available to your function.
Depending on the function, you might find that a higher memory level might actually cost less because the function can complete much more quickly than at a lower memory configuration.