-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
RFC: Combine Test and Prod permissions for Api Events #1102
Comments
This looks good. Thanks for getting to this eventually. |
Could SAM just create one permission that works for both without specifying any flag? like this
|
I'd be happy with whatever way to reduce the number of generated permissions, the situation is getting unbearable with some deployments, especially in cases when the permission resources end up being replaced. In addition to disabling the test permissions I'd also like having the option to disable permission generation completely and bringing my own permissions instead. |
@ferdingler This is an interesting approach. We had a discussion about this approach in the team and we did a deep dive on this approach. Both the permissions look similar except for the change in ProdPermission Arn: If we make a change to the ProdPermission arn by replacing |
@ShreyaGangishetty awesome, thanks for considering my input! |
@ferdingler We ended up going with your approach (see #1119), which is a much simpler change. Really appreciate your feedback! |
Any idea when this will be released? |
@kriztoph this is going out in v1.15, which is our next planned release. It will be coming out soon! |
Closing this issue as v1.15.0 is released |
Issue Summary
Currently, SAM creates two permissions (one for production and one for test) for every API event defined in the CloudFormation stack. The test permission is needed for the Test button to work on the console. Because of this extra permission for the test button, the limit of 200 resources per stack can be quickly reached. Related Issues: #285, #337
Design Spec
The approach is to combine both permisions into a single permission and give the exact same functionality without a spec change. This is achieved by using a
"*"
in place of the stage name in the single permission, which is exactly what the "Test" permission does today.Sample Template:
For this sample template, the resources generated by existing approach look like:
With the proposed approach the resources generated would look like:
This approach will reduce the number of permissions created for api events by half. This approach gives the same functionality as the existing approach without any change in the spec. Hence, it is backward compatible.
The text was updated successfully, but these errors were encountered: