【以下的问题经过翻译处理】 我正在使用AWS CLI将Lambda函数作为组件导入ggv2。 Lambda函数成功导入,但是当我部署到greengrass v2时,出现以下错误:
Error occurred while processing deployment. {deploymentId=********************, serviceName=DeploymentService, currentState=RUNNING}java.util.concurrent.ExecutionException: com.aws.greengrass.componentmanager.exceptions.NoAvailableComponentVersionException: No local or cloud component version satisfies the requirements. Check whether the version constraints conflict and that the component exists in your AWS account with a version that matches the version constraints. If the version constraints conflict, revise deployments to resolve the conflict. Component devmgmt.device.scheduler version constraints: thinggroup/dev-e01 requires =3.0.61. at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
版本已存在,因为已成功导入,但是这个程序包没有传输到Greengrass Core。如果我从AWS管理控制台导入lambda,则可以按预期工作。
以下是我的CLI json输入文件以及我运行的命令。 我错过了什么?
aws greengrassv2 create-component-version --cli-input-json file://lambda-import-worker.json
lambda-import-worker.json文件:
{
"lambdaFunction": {
"lambdaArn": "arn:aws:lambda:*******:***************:function:devmgmt-worker:319",
"componentName": "devmgmt.device.scheduler",
"componentVersion": "3.0.61",
"componentPlatforms": [
{
"name": "Linux amd64",
"attributes": { "os": "All", "platform": "All" }
}
],
"componentDependencies": {
"aws.greengrass.TokenExchangeService":{
"versionRequirement": ">=2.0.0 <3.0.0",
"dependencyType": "HARD"
},
"aws.greengrass.LambdaLauncher": {
"versionRequirement": ">=2.0.0 <3.0.0",
"dependencyType": "HARD"
},
"