in app/collectors/lambda.scala [63:80]
private def getRuntime(lambda: FunctionConfiguration): Option[String] = {
if (lambda.runtime == Runtime.UNKNOWN_TO_SDK_VERSION) {
log.warn(
s"Lambda runtime ${lambda.runtimeAsString} isn't recognised in the AWS SDK. Is there a later version of the AWS SDK available?"
)
}
/*
From the docs:
If the service returns an enum value that is not available in the current SDK version, runtime will return Runtime.UNKNOWN_TO_SDK_VERSION.
The raw value returned by the service is available from runtimeAsString.
That is `runtimeAsString` is the safest string representation of a lambda runtime as `Runtime.UNKNOWN_TO_SDK_VERSION.toString` yields a NPE.
See: https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/lambda/model/FunctionConfiguration.html#runtimeAsString--
*/
Option(lambda.runtimeAsString) // remove `null`s
}