简体   繁体   English

设置 Java AWS Lambda 虚拟机参数

[英]Setting Java AWS Lambda VM Parameters

Is there a way I can configure VM parameters on a Java AWS Lambda?有没有办法在 Java AWS Lambda 上配置 VM 参数? I've already searched the AWS Lambda docs and blogs, and have found no way to configure the underlying system whatsoever.我已经搜索过 AWS Lambda 文档和博客,但没有找到任何配置底层系统的方法。

At least some JVM arguments can be passed via the JAVA_TOOL_OPTIONS environment variable. 至少有一些JVM参数可以通过JAVA_TOOL_OPTIONS环境变量传递。 I've used this successfully to debug classpath loading issues with the "-verbose:class" flag for example. 我已成功使用它来调试带有“-verbose:class”标志的类路径加载问题。

You can provide VM parameters via a wrapper script (see AWS Lambda Developer Guide - Wrapper scripts ).您可以通过包装器脚本提供 VM 参数(请参阅AWS Lambda 开发人员指南 - 包装器脚本)。 The following blog shows how to do this for the -XX:+TieredCompilation -XX:TieredStopAtLevel=1 flags. 以下博客展示了如何针对-XX:+TieredCompilation -XX:TieredStopAtLevel=1标志执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM