Lambda cold start possible solution?

前端 未结 6 1913
青春惊慌失措
青春惊慌失措 2021-01-03 23:42

Is scheduling a lambda function to get called every 20 mins with CloudWatch the best way to get rid of lambda cold start times? (not completely get rid of)...

Will

6条回答
  •  旧时难觅i
    2021-01-04 00:10

    Among adding more memory for lambda, there is also one more approach to reduce the cold starts: use Graal native-image tool. The jar is translated into byte code. Basically, we would do part of the work, which is done on aws. When you build your code, on loading to AWS - select "Custom runtime", not java8.

    Helpful article: https://engineering.opsgenie.com/run-native-java-using-graalvm-in-aws-lambda-with-golang-ba86e27930bf

    Beware:

    but it also has its limitations; it does not support dynamic class loading, and reflection support is also limited

提交回复
热议问题