0
votes

My invocation of the ask deploy command failed because of the following error:

$ 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.

How can I fix this error?

2

2 Answers

1
votes

The .aws/config file will look something like below. If you change the endpoint uri to match the lambda function ARN that you have in skill.json, the skill should deploy using ask deploy

{
  "deploy_settings": {
    "default": {
      "skill_id": "",
      "was_cloned": false,
      "merge": {
        "manifest": {
          "apis": {
            "custom": {
              "endpoint": {
                "uri": "<lambda-arn-here>"
              }
            }
          }
        }
      },
      "in_skill_products": []
    }
  }
}
0
votes

For my problem, the solution was to clone my repository into a new directory and deploy from there. For example:

$ 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.

I found this solution suggested in a comment on this intro to ASK CLI video.