-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I tested Lambda SnapStart out in maap-eoapi and it reduced the cold start time of the titiler-pgstac /healthz
endpoint from ~6.4 seconds to ~1.5 seconds.
For any given Lambda, the changes required are:
- Upgrade the runtime to at least Python 3.12
- for titiler-pgstac you need to make sure libexpat.so.1 is available in LD_LIBRARY_PATH because it is not available by default in the Python 3.12 runtime
- Add
snapStart: lambda.SnapStartConf.ON_PUBLISHED_VERSIONS
to the Lambda construct - Point the
HttpLambdaIntegration
at a registeredversion
of the Lambda function - Update the handler with runtime hooks that determine specific things to do before taking the snapshot and after loading from a snapshot.
ceholden
Metadata
Metadata
Assignees
Labels
No labels