【发布时间】:2018-09-13 11:03:15
【问题描述】:
由于以下错误,我对 ask deploy 命令的调用失败:
$ ask deploy
[Error]: Invalid url info.
Cannot find valid lambda function with the given name, nor find sourceDir as codebase path to create lambda function.
我该如何解决这个错误?
【问题讨论】:
由于以下错误,我对 ask deploy 命令的调用失败:
$ ask deploy
[Error]: Invalid url info.
Cannot find valid lambda function with the given name, nor find sourceDir as codebase path to create lambda function.
我该如何解决这个错误?
【问题讨论】:
.aws/config 文件如下所示。如果您更改端点 uri 以匹配您在 skill.json 中拥有的 lambda 函数 ARN,则应使用 ask deploy 部署技能
{
"deploy_settings": {
"default": {
"skill_id": "",
"was_cloned": false,
"merge": {
"manifest": {
"apis": {
"custom": {
"endpoint": {
"uri": "<lambda-arn-here>"
}
}
}
}
},
"in_skill_products": []
}
}
}
【讨论】:
对于我的问题,解决方案是将我的存储库克隆到一个新目录并从那里部署。例如:
$ ask clone --skill-id <<MY_SKILL_ID>>
-------------------- Clone Skill Project --------------------
Project directory for mySkill created at
./mySkill
Skill schema for movie-go created at
./mySkill/skill.json
Skill model for en-US created at
./mySkill/models/en-US.json
Downloading Lambda functions...
arn:aws:lambda:us-east-1:876716374418:function:ask-custom-mySkill-default download finished.
$ cd mySkill/
$ ask deploy
This skill project was cloned from a pre-existing skill. Deploying this project will
- Update skill metadata (skill.json)
- Update interaction model (models/*.json)
- Deploy the Lambda function(s) in ./lambda/*
? Do you want to proceed with the above deployments? Yes
-------------------- Update Skill Project --------------------
Skill Id: <<MY_SKILL_ID>>
Skill deployment finished.
Model deployment finished.
Lambda deployment finished.
我在this intro to ASK CLI video 的评论中发现了这个解决方案。
【讨论】: