Thursday, May 30, 2019

[Error]: Please provide the uri (either ARN or function name if using Lambda) for custom/default.

I took template skill after ASK(Alexa Skill Kit) setup and was trying to deploy that skill, and skill deployment was failing with following error:

"[Error]: Please provide the uri (either ARN or function name if using Lambda) for custom/default."

I edited apis section in my skill.json to add uri section as   "ask-custom-fact-default"   and skill was deployed successfully and lambda was created with name "ask-custom-fact-default" in my aws account.

    "apis": {
      "custom": {
        "endpoint": {
          "sourceDir": "lambda/custom",
          "uri": "ask-custom-fact-default"
        }
      }
    },

How to associate vendor id with ASK CLI?

if your vendor id is not set , "ask deploy" will fail with an error "[Error]: There is no vendor ID for your account.". I spent hours finding out the issue and finally following solution worked for me :
The value of vendor_id represents the Amazon developer vendor ID associated with the ASK CLI profile. Every Amazon developer account has a customer ID and one or more vendor IDs. To see them, go to https://developer.amazon.com/mycid.html and sign in with your Amazon developer account. When you run ask init and sign in to an Amazon developer account with more than one vendor ID, ASK CLI asks you to choose the one to use.

More details are found here 
https://developer.amazon.com/docs/smapi/manage-credentials-with-ask-cli.html