Alexa-skills-kit-sdk-for-nodejs: ask-cli deploy big projects

Created on 3 Apr 2018  Â·  11Comments  Â·  Source: alexa/alexa-skills-kit-sdk-for-nodejs

it seems that ask deploy doesn't support big projects. zip file of my project about ~38mb and ask deploy just freezes and after while I'm getting:

â—  Updating Lambda function...Upload Lambda function error.
TimeoutError: Connection timed out after 120000ms
I've found in aws lambda console that code which is more than 10mb is recommended s3. But it would be much helpful if ask-cli fails with a more helpful message here

Do you have plans to implement this pipeline on ask-cli level?

Sadly, I don't see here and there any information about the maximum size recommendation and how could be organized pipeline of skill deployment in this case.

All 11 comments

@hyzhak Based the information here, the limit of Lambda function deployment package size (compressed .zip/.jar file) is 50MB. Yours is 38Mb which should be fine.

@TianTXie ok, thanks for feedback. Does ask-cli and manual deployment works the same way?
I have problem exactly with ask-cli for big projects. But manual deployment or deployment with ask-cli for small projects works fine.
I will try to increase timeout for ask-cli, maybe for some reasons it takes more than 120000ms but for the note when I deploy manually it takes less than 60000ms.

hey all, I'm having the same issue, When I add npm install firebase-admin to my lambda function now the zipfile is 32.3 MB. It just hangs when I do

ask deploy

@hyzhak , have you found any other solution until the team comeback with a reply. I can see there is an option of uploading the ZIP file to S3, but I'm not sure what exactly needs to be done. I tried and didnt work. Appreciate if you have any findings on alternative methods, cheers.

@sameera207 yes, cmd ask-cli still doesn't work for me, so I'm upload zip manually to s3 and then move it to lambda. So pipeline is till broken for large zips.

thanks @hyzhak , I did the same and got it working :)

@sameera207 cool, but sadly it is much longer than use cmd tools, and also hard to automatize. So I hope Alexa team will fix ask-cli soon.

Hi all,

This is a feature request that we would recommend to post on Alexa user voice forum. I've forwarded this issue to the corresponding team.

Hi @hyzhak and @sameera207 !

First thanks for using ask-cli. I think you guys raised very good questions and might need us to upgrade our logic for lambda deployment.

To answer your question:

  1. For the current version, we only have the zip option for Lambda upload so there will be a failure message when the size breaches (message in the format of "Request must be smaller than xxxx bytes for the UpdateFunctionCode operation"). Luckily we also noticed the improvement space for Lambda, we will prioritize this and provide a fully upgraded Lambda solution.
  2. To keep the benefit of automation that CLI brings, the main idea is to exclude Lambda deployment out of the deploy command. You can choose to use aws-cli to manage you lambda upload and ask-cli for the rest (this can be set by using "ask deploy --target"), depending on how you work on the skill.
  3. For the error message, because this is the error message from aws-sdk, we can only display it directly... There is no error code and it's not good practice to map their error string to ours.

Let me know if you have any further question! We will also try to provide the s3 option with our best.

Ron

@hyzhak Have you tried uploading it from the command line with aws cli
If that works, you can write a simple shell script that deletes node_modules, does a fresh npm install, zips the lambda folder and uploads it with aws lambda update-function-code

I have a project that is no more than 35 mb including the node modules, but when deploying via the ask cli the .zip file can go up as much as 20+ gb! And the size increases as the process continues. There has to be something wrong with the compression process.

screen shot 2018-08-17 at 23 11 29

I have the same issue deploying lamda function from ask cli taking 3 to 4 minutes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

developer170883 picture developer170883  Â·  4Comments

rmtuckerphx picture rmtuckerphx  Â·  5Comments

talkingnews picture talkingnews  Â·  5Comments

rmtuckerphx picture rmtuckerphx  Â·  3Comments

sandeepajesh picture sandeepajesh  Â·  5Comments