aws lambda中的java重写jvm选项

1szpjjfi  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(302)

我想用aws lambda函数运行javaagent。在跑步时 sam local 我得到以下信息:

Picked up JAVA_TOOL_OPTIONS: -javaagent:/opt/agent.jar
An error has occurred while processing the shared archive file.
Tool agent requires sharing to be disabled.
Error occurred during initialization of VM
Unable to use shared archive.

现在,我已经讨论了:永久地增加java堆的大小?并尝试了类似的方法重写-xshare选项,这是通过定义 _JAVA_OPTIONS: -Xshare:off 当测试通过 sam local ,但当您尝试在aws上发布相同内容时,会出现另一个错误:

environment.variables failed to satisfy constraint: 
Map keys must satisfy constraint: [Member must satisfy 
regular expression pattern:[a-zA-Z]([a-zA-Z0-9_])+] 
(Service:AWSLambdaInternal; Status Code: 400;
Error Code: ValidationException;

谢谢你的帮助。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题