2
votes

I'm trying to deploy my Alexa skill using ask-cli. I have added firebase to my lambda function as it requires to my skill.

Now it shows 138.3 MB on disk as the lambda folder size.

When I do ask deploy , I get this and nothing happens (it just hangs there)

enter image description here

I found this discussion and this page that outlines the file sizes for aws lambda, according to that, I think I'm within the size limits.

uncompressed .zip/.jar size is 250MB

is anyone else having this issue ? or know how to fix this ?

I'm using ask cli version 1.2.0

1
did you check if you have write permission to create a lambda function? also did you define a default profile to your ask cli and give that profile the required permission to create a lambda function?bgsuello
thanks @bgsuello for the reply, I didn't explicitly do that. However If I use the same commands with the project without any extra npm packages, it works as expected. So , I believe permissions are all goodsameera207
how about compressing then uploading your lambda function manually?bgsuello
Consider posting this on the Alexa developer forums. Seems like it might be a problem in the CLI. That being said, please also consider: a) storing the code for the lambda function in S3 and configuring Lambda to pull the code from there. b) keeping your Lambda small to ensure the skill is responsive even with cold starts. Such a large package will take a long time to load whenever the container needs to be initiliazied from a cold start!Mike Dinescu

1 Answers

2
votes

I had this issue and it usually happened because I previously aborted a Lambda upload. The problem for me was there being a leftover deployment .zip file in the lambda\custom directory. After aborting the apparent hung deployment, I would find a second .zip file that was huge depending upon how long I waited until I aborted the upload (one was 8GB in size!). Once I deleted all the .zip files, deployment had no issues. Just delete the .jar/.zip files and try again. Works like a charm!