Monday, April 15, 2019

AWS Lamdba: Exception in thread "main" java.lang.Error: java.lang.OutOfMemoryError: Metaspace

Execution of newly created Lambda gives below error

Exception in thread "main" java.lang.Error: java.lang.OutOfMemoryError: Metaspace

Bydefault the Memory allocated to Lambda is 128MB this needs to be increased

Solution:









Navigate to your Lambda in AWS and update the Basic setting increase the Memory and test it out