-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
NoSuchKey during deployment #41
Comments
Looking at this the only thing I see weird is the key path, and I can't see 100% the copySource. Here is a healthy request.
It should be that the CopySource is the path to the resource including the bucket name in S3. So if the S3 location is s3://bucketName/test.js then CopySource should be bucketName/test.js. The key is the path to the file after the bucketName and forward slash (/). In the same example if the S3 location is s3://bucketName/test.js then they Key should be test.js. From what I see the key has a forward slash (/), the Key is generated for this with the following code ** Key: file.name.replace(localDir, ''),** where localDir is [servicePath, s.localDir].join('/') and file.name is the path to the local file. In the custom.s3Sync[n].localDir parameter, you should add a forward slash (/) to the localDir and this should function as you expect it to. |
That fixed the issue for me @trilom (the slash on the end of the Any chance a future version could auto-detect for the slash there as the error is unclear without your explanation. |
In my case localDir has no trailing slash but it can't make out sure what triggers the issue. |
Sure @trilom serverless.yml
Error
|
Unfortunately it failed with the very same config/output as above @robinvw1 |
@gs11 I'll test it out and see if I can replicate the issue. I might not get to it until the weekend though. If you're on the Serverless Framework Slack group (https://serverless.com/slack) feel free to message me on there and we'll get it sorted for you. |
@gs11 can you please test by updating the package.json to reference: I've tested my revised code with your config file but I dropped the Cloudfront Distribution for testing (this shouldn't impact the deployment process). I will create the revised PR now, but would love your confirmation before @k1LoW merges it. |
Thanks for swift feedback! Tested successfully with that branch version 👍 @nibynool |
@gs11 can you update to the latest release version and then close this issue if you're happy with the solution. Thanks. |
Thanks! |
Since version 1.10.1 deployments fail with a NoSuchKey error
The text was updated successfully, but these errors were encountered: