-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: sam sync error when layer with ContentUri set to s3 object #6873
Comments
Thanks @AlexMayleRdn. I agree, we should handle this case better and definitely shouldn't crash. I've marked this as a bug for prioritization. |
Any workaround you can see for the time being? I've been having to actually remove everything in my template other than my function I'm testing (it doesn't even use the layers) and running sam sync. I've tried supplying the |
Are you able to use the |
For reference, we have done something similar for Lambda functions to skip trying to build a non-buildable artifact. We need to do the same thing for layers #5222 |
Patch is released in v1.121.0. Closing |
Description:
I'm aware that building layers whose ContentUri is specified as a s3 object is not supported, but I wouldn't expect having one to completely disable the ability to use sam sync.
Steps to reproduce:
Just write a template with a function and a layer whose ContentUri is an s3 object. Use sam deploy to deploy it.
Then edit some code in the function and run
sam sync --code --build-in-source --no-dependency-layer
Observed result:
Expected result:
I expect the layer to not be built and just build the function. The function gets deployed and uses the layers. Note that a sam deploy command was already run so those layers exist. It seems that this command should succeed especially because the
--code
flag was used. By definition, these layers can't be updated from the working directory (since the content comes from s3) so sam sync will never be put in a position where it has to touch the layers. It can just ignore them and sync the function's code. It won't even have to update the function's layer versions because we are just syncing code here.Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: version 1.105.0The text was updated successfully, but these errors were encountered: