in aws-lambda-agent/src/main/java/jetbrains/buildServer/runner/lambda/function/ZipFunctionDownloader.kt [9:18]
override fun downloadFunctionCode(): ByteBuffer {
logger.message("Downloading function's ZIP...")
val fileStream = URL(url).openStream()
val tempFile = kotlin.io.path.createTempFile().toFile()
TCStreamUtil.writeBinary(fileStream, tempFile.outputStream())
logger.message("Download finished successfully...")
return ByteBuffer.wrap(tempFile.readBytes())
}