I'm trying to find the maximum number of virtual processor cores available in AWS Lambda. The official documentation implies that it scales with the amount of configured memory:
However, running the following snippet gets me Number of cores = 2
even if I configure the highest amount of memory requestable: 1536 MB.
package example;
import java.io.{ InputStream, OutputStream }
class Main {
def main(input: InputStream, output: OutputStream): Unit = {
val result = "Number of cores = " + Runtime.getRuntime().availableProcessors()
output.write(result.getBytes("UTF-8"))
}
}
So what's going on here? Am I using availableProcessors()
wrong or misinterpreting its result incorrectly? Or are there some other configurations that's need to get more cores?