awslabs / cid-framework

Apache License 2.0
30 stars 27 forks source link

Increase MemorySize of inventory-Lambda function #201

Closed habibmasri closed 2 months ago

habibmasri commented 2 months ago

inventory-Lambda function running out of memory causing the state machines that are calling it to fail (specifically the AccountMap state)

Lambda log messages showing the high memory usage before the error:

2024-09-10T13:32:59.424Z REPORT RequestId: fa60295b-85a2-495a-a7e2-da5c85a5eb1e Duration: 19266.38 ms   Billed Duration: 19267 ms   Memory Size: 2688 MB    Max Memory Used: 2581 MB    

2024-09-10T13:32:01.978Z START RequestId: 7102cad9-db37-4b26-b9c9-123665f50123 Version: $LATEST
...
2024-09-10T13:32:01.979Z [INFO] 2024-09-10T13:32:01.979Z    7102cad9-db37-4b26-b9c9-123665f50123    Collecting ec2-instances for account 111222333444
2024-09-10T13:32:01.979Z [INFO] 2024-09-10T13:32:01.979Z    7102cad9-db37-4b26-b9c9-123665f50123    Collecting in us-east-1
2024-09-10T13:32:02.841Z [INFO] 2024-09-10T13:32:02.839Z    7102cad9-db37-4b26-b9c9-123665f50123    Collecting in us-east-2
2024-09-10T13:32:03.720Z [INFO] 2024-09-10T13:32:03.718Z    7102cad9-db37-4b26-b9c9-123665f50123    Collecting in us-west-1
2024-09-10T13:32:04.809Z [INFO] 2024-09-10T13:32:04.807Z    7102cad9-db37-4b26-b9c9-123665f50123    Collecting in us-west-2
...
Error Runtime exited with error: signal: killed
Runtime.ExitError