Serkan Özal
03/29/2022, 5:16 PMtreq
) to trace module imports/requires to show you the most expensive dependencies to be imported/required during coldstart: https://github.com/serkan-ozal/treq
I hope you find it useful and it help you while investigating coldstart delays.
Waiting for your feedbacks.
Cheers
--
Serkanthdxr
03/29/2022, 5:25 PMRoss Coundon
03/29/2022, 7:26 PMtreq
inside the nodeModules array in your bundle to make it work using the NODE_OPTIONS methodCarlos Daniel
03/29/2022, 11:03 PM|-- require('/Users/usr/www/ds/ail/csapi/src/handlers/faq/.build/submit-lost-order.js') took 1819.791614 ms
..|-- require('uniqid') took 10.260321 ms
..|-- require('axios') took 62.672446 ms
....|-- require('./lib/axios') took 58.076417 ms
......|-- require('./core/Axios') took 46.927798 ms
........|-- require('./dispatchRequest') took 40.297035 ms
..........|-- require('../defaults') took 32.747661 ms
............|-- require('./adapters/http') took 29.592114 ms
..............|-- require('follow-redirects') took 15.916533 ms
................|-- require('debug') took 11.55629 ms
just show this:
|-- require('/Users/usr/www/ds/ail/csapi/src/handlers/faq/.build/submit-lost-order.js') took 1819.791614 ms
..|-- require('uniqid') took 10.260321 ms
..|-- require('axios') took 62.672446 ms
Serkan Özal
03/30/2022, 4:40 AMSerkan Özal
03/30/2022, 4:40 AMSerkan Özal
03/30/2022, 5:16 AMtreq
new layer version 3
(arn:aws:lambda:${region}:273094347961:layer:treq:3
) with the new TREQ_MAX_DEPTH
configuration to limit maximum depth/level to trace nested requires/imports.
FYICarlos Daniel
03/30/2022, 10:28 AM