userLayer will never be bound to the lambda1 function because this plugin adds the nodejs layer to function.layers which takes priority over provider functions.
the only solution I can think of is:
check before we add the layers
if we have no function layers add the nodejs layer to the provider
if there are function layers add the nodejs layer to functions (current behavior)
or we can have a setting that decides whether this plugin adds to provider.layers or function.layers
until then we can implement the following warning: if there are provider layers log output to warn the user that they will be ignored for all functions because this plugin adds layers to functions
Obviously there is no hurry on this. this is none blocking because I can add my self created layers to the functions.
~If you point me in the right direction I can send you a PR for my suggested solution above~
~I am trying to find if I have access to read+write from providers.layers in relateLayerWithFunctions but I can't find it~
Edit: found it PR incoming soon
Consider this
serverless.yml
:userLayer
will never be bound to thelambda1
function because this plugin adds the nodejs layer tofunction.layers
which takes priority over provider functions.the only solution I can think of is:
Obviously there is no hurry on this. this is none blocking because I can add my self created layers to the functions.
~If you point me in the right direction I can send you a PR for my suggested solution above~ ~I am trying to find if I have access to read+write from
providers.layers
inrelateLayerWithFunctions
but I can't find it~ Edit: found it PR incoming soon