I would like to go over how to diagnose the issue to make sure this is a memory issue
You can go to the monitoring tab and see if the lambda is maxing out it's memory or not
i.e. this lambda is fine
but this lambda isn't 
Another way is to check the logs after each execution you will find a similar line:
REPORT RequestId: 84b3733a-8e1a-4fc8-8bc4-b30f4b9149ba Duration: 39651.34 ms Billed Duration: 39652 ms Memory Size: 512 MB Max Memory Used: 512 MB XRAY TraceId: 1-65bc4cc0-54791eb622434119696221cd SegmentId: 6a9519384aa29822 Sampled: true
You can see Memory Size: 512 MB and Max Memory Used: 512 MB
if it's maxing out then you should definitely increase the memory
We have IaC so we had to change this in 2 places we directly changed it in the console to take effect immediately and also in the code so further deploys have the higher memory.
Do not increase the memory unless you need to so you can save some money.