New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serverless Error ---- No .serverless/*.zip file found in the package path you provided #4720
Comments
Seems to be an issue with "package individually: true" which I set only at service level. When I removed it the deployment works fine using CodeBuild but my functions are not packed individually which I need. |
Hi @ryub3n ! I recently stuck with the same problem as you! As a work around, I can use package:individually in the service level and use include/exclude in the function level. |
Just had this happen to me using the latest version of serveless while using the serverless lambda@edge plugin. Setting package:individually at the service level fixed my issue! Thanks @kkesley |
After I upgrade to the latest(1.32) I got this same issue and removing the individually: true somewhat fixes the issue. But then I have to specify that in every function |
serverless@1.39.0 also breaks this, here is part of my serverless.yml
on serverless@1.39.0 i get:
downgrading to serverless@1.38.0 works |
Encountered the same problem after v1.39... |
I can confirm this bug, works fine with 1.38.x and breaks on 1.39.x (see referenced commit/issue right above) :/ |
Related with #5931 |
Same here - encountering this on 1.39.0, works fine on 1.38.0 |
I have same issue too, it was working before but started failing Serverless: [AWS s3 200 0.058s 0 retries] getBucketLocation({ Bucket: '*******-artifacts-us-east-1' }) Serverless Version: 1.39.0 |
same issue with previous 2 comments. it's weird since when I check the |
Only happens on >1.39.0 |
Any news? Any workariunds? I have downgraded to |
It's happening in the version 1.54.0 as well. I am using CodeBuild to package and deploy the functions individually on a service level rather than function level. I can do Any help is appreciated. |
Any workarounds? |
This is STILL happening in 1.67.0. I am using Azure Pipelines to try to deploy the functions individually on a service level. I can see the zip files in the .serverless directory in the logs, but the deployment fails with This is a total deal breaker if you're trying to implement a workflow to pull down the latest staging artifacts and deploy them to production. I can't believe this has zero visibility or responses. |
Looks like the absolute path to the packaged artifacts is written in the serverless-state.json. Due to this the package isn't portable anymore. As a workaround I'll try to rewrite the serverless-state.json during deployment. But it's rather ugly.... :-( |
Having the exact same problems as @MichaelGoberling and would prefer not to go down the route @sschulze. Any updates now? |
@medikoo This happens also on my jenkins environment targeting lambda and the original user was using codebuild, I'm not sure if such issue should be pushed to azure specific issues. |
In other news I moved my service level Before (throws missing zip error):
After (now working):
|
Are there any updates on this ? Currently facing the same error when deploying individual functions using CodeBuild. Tried above suggestions with no success. Setting
|
I'm going to close it, as (1) it's a very old issue, reported to very outdated version of a Framework, and many issues have been fixed since then (2) Report is vague, doesn't provide any details on configuration used, from following comments it appears that many plugins are involved, and they can influence the error (in such case bug report should go to problematic plugin repository) However if you have similar issue, and feel it's a bug in a framework, please open a new bug report respecting all it's remarks. Having all requested information we should be able to coin issue promptly. |
For anyone else experiencing this issue, I finally identified the root cause and a simple workaround. In summary, the "artifact" incorrectly has "$CODEBUILD_SRC_DIR" in the value. Also, the srcxxxxxxxxxx number changes between deploy and build, so you can't just do a find/replace for the exact string in DEPLOY since the value is the $CODEBUILD_SRC_DIR that was in BUILD. For each function in the serverless-state.json, you will see an artifact property that looks similar to: To work around this issue, I simply added the following two lines in my BUILD commands, immediately above the 'serverless deploy ...' statement.
Note: I am using the '${!stage}' value in my code, but this may be different in your implementation - probably $ENV. This will transform the "/codebuild/output/src887072543/src/.serverless/function.zip" statements to ".serverless/function.zip", allowing the deploy process to find the file without error. This took me a while to figure out, so I hope it helps others that may be experiencing the same issue. |
Thanks @jplandry908, it worked like a charm! |
This is a (Bug Report / Feature Proposal)
Description
For bug reports:
Serverless deploy on AWS CodeBuild using an artifact from s3 caused a Serverless Error No .serverless/*.zip found
The CF stack should've been created.
My config is big and it deployed the package correctly when I ran serverless deploy from my laptop using AWS profile.
log.txt
I'm calling serverless deploy in the build phase and it copies my package contents to the .serverless folder and then says it can't find it. I've even listed the contents of the folder and can see it.
My artifact comes from s3 and it's a zip file with the below contents:
I even tried invoking it from post_build with no luck.
Additional Data
The text was updated successfully, but these errors were encountered: