-
Notifications
You must be signed in to change notification settings - Fork 68
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 1.27.x breaks the plugin: Any policy not added to alias of lambda function for all events #120
Comments
Hi @c--m , can you check if the reason is the new 1.27.2 version of Serverless or the new 1.7.0 version (opposed to 1.6.1) of the alias plugin? |
I just checked. serverless : 1.27.* serverless : 1.26.1 So it looks like serverless 1.27 broke something |
Thanks for testing - that's bad. I think someone changed the construction of the API Gateway resources in 1.27.x, so that the resources are not patched correctly anymore. @horike37 Do you have any idea what changed in Serverless in that area? This might also affect other plugins, |
We also experience broken deployments with 1.27.x when using CW event triggers. It seems there was a breaking change in the resource layouts in 1.27 |
I think I found the issue:
SLS now uses |
Did some further analysis, and it seems that EVERYTHING is bound to |
I think I found the reason. For all permissions, Serverless now creates the Principal property with dynamic CF references. The plugin has to apply a different detection mechanism now to support this new breaking format. |
Verified that this is the problem. Fix is on the way and will be released with 1.7.1 today. |
I did a test with one of our projects and it seems that everything used is attached to the aliases again (APIG, CW events, SNS and Kinesis). I'd assume that all other permissions work properly again too 😄 . Hotfix release is on the way. |
Hotfix released with 1.7.1 |
Thanks for the fast work on the fix. serverless 1.27.2 |
serverless : 1.27.2
serverless-aws-alias : 1.7.0
After a fresh
sls deploy
, or subsequentsls deploy --alias alias
, the aliases of my lambda functions don't have any Api Gateway trigger attached, nor any function policy. Those are attached only on my bare function without any identifier ($LATEST, or alias, or version number)As a result, none of my Api Gateway resources are working, since they are referred to with the alias (MyProject-dev-myFunction:${stageVariables.SERVERLESS_ALIAS})
All the rest seems to be set up properly
The text was updated successfully, but these errors were encountered: