Lambda does not upload when deploying from CLI
mtliendo opened this issue · 7 comments
Issue
After cloning and installing the project per the readme, with no changes to the code, I run the cli command ask deploy
and the skill does in fact get a skill Id
and shows up in the alexa developer portal, however my terminal pauses on "Creating lambda function".
Steps taken to attempt to resolve
- verified that there is no lambda created in the aws devloper console
- verified there is a registered skill in the alexa developer portal
- verified that the
/lambda/custom
directory does in fact get a generated zip file for the lambda (6.9mb) where the contents contain the correct project source code and dependencies. - verified permissions of the associated aws profile having
AdministratorAccess
policy attached - performed the same steps with the pet match skill template as was able to successfully deploy
versions:
ask --version => 1.6.2
aws --version => aws-cli/1.15.71 Python/2.7.15 Darwin/17.7.0 botocore/1.10.70
npm --version => 6.5.0
node --version => 11.2.0
Terminal output:
Skill deployment finished.
Model deployment finished.
[Warn]: No runtime and handler settings found for alexaUsage "custom/default" when creating Lambda function. CLI will use "nodejs8.10" and "index.handler" as the Runtime and Handler to create Lambda. You can update the runtime and handler for the target Lambda in the project config and deploy again if you want to set differently.
◟ Creating lambda function...
Possibly Related 🤷♂️
The VScode extension has a linting error on sourceDir
and the value of the uri
field due to them being not supported and in the wrong format, respectively.
the warning and the linting error are related, but should not be the cause of the issue (it should auto correct). Try running the deploy with the --debug flag to see what is reported.
(the warning and linting are tied to moving the lambda function name value into the skill.json file to better allow for the python and the use of the hook scripts. the cli will automatically fill in the lambda name based on the skill name and the warning is a note that the old format is still present. Will get a code update to fix that, but as noted, but should not be related to your issue, but the debug info will shed some light.)
After waiting ~5 minutes
colors git:(master) ✗ ask deploy --debug
###########################
##### pre-deploy hook #####
###########################
Codebase (lambda/custom) built successfully.
###########################
Profile for the deployment: [default]
-------------------- Update Skill Project --------------------
Skill Id: [SKILL_ID]
Skill deployment finished.
Model deployment finished.
[Warn]: No runtime and handler settings found for alexaUsage "custom/default" when creating Lambda function. CLI will use "nodejs8.10" and "index.handler" as the Runtime and Handler to create Lambda. You can update the runtime and handler for the target Lambda in the project config and deploy again if you want to set differently.
◠ Creating lambda function...
Oh I see. Once I killed it the process it puked out a bunch of response headers and request bodies. It's fairly verbose. Is there a particular section I should be focusing on? All status codes are 200
. A manifest appears to have been accepted and the body shows a {status:SUCCEEDED}
In another request body, the manifest is output as json, which has keys that store the locale, description, category, etc of the skill.
Same for the interaction model.
Hmmm...a section regarding presumably cloudfront configuration has the following:
Response headers: {"content-type":"application/json","content-length":"2","connection":"close","server":"Server","date":"Mon, 11 Feb 2019 03:21:12 GMT","x-amzn-requestid":"14e4bbe1-2dac-11e9-b1fb-2b69e2d8692e","x-amz-date":"Mon, 11 Feb 2019 03:21:12 GMT","location":"/v1/skills/amzn1.ask.skill.fe3fbcf2-070e-4961-a4ce-4f0095cabda7/status?resource=interactionModel","x-amz-rid":"FQS9XT25S7ZBGW333FQQ","vary":"Accept-Encoding,X-Amzn-CDN-Cache,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 50fe1d71b205e020c992be911ed0d44c.cloudfront.net (CloudFront)","x-amz-cf-id":"AhgNjlhQ7EW7F3v7JsAcMIMOcXV4ROaubUTgiDoyal0sAJAV72Oe6w=="}
Response body: {}
I'd look for a message related to connecting to the aws endpoint. I'd look for an error or a message for something which starts but never finishes.
did you get this sorted out?
Hmm..I'm not sure what fixed it, but it seems to be working now. Thanks for circling back!