Feature request: Allow explicit DefaultAuthorizer: None on AWS::Serverless::Api #3313
Replies: 8 comments 4 replies
-
thanks @ethanmills for raising this request. |
Beta Was this translation helpful? Give feedback.
-
Thinking about it, this might belong in https://github.com/aws/serverless-application-model? |
Beta Was this translation helpful? Give feedback.
-
sorry I missed the issue title, yes this should belongs to the SAM Translator repo. I will move it there. |
Beta Was this translation helpful? Give feedback.
-
If it's likely to be accepted I'd be interested in writing a PR for this |
Beta Was this translation helpful? Give feedback.
-
Hi @ethanmills, we still accept external PRs so we'd be happy to review and merge. Please follow our development guidelines when making the code change. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Moving to discussions where we track feature requests, but I agree we would take a PR on this. The discussion could also be used to consider how to represent the "None" authorizer. |
Beta Was this translation helpful? Give feedback.
-
One problem you might run into is that we use the Authorizer name as a way to look up an Authorizer we have defined. We need to be careful that we don't create a breaking change here. It might be worth creating a sort of "Dummy Authorizer" so that you're explicitly defining and referencing a named "none" authorizer. |
Beta Was this translation helpful? Give feedback.
-
Hi @ethanmills, thanks for raising this feature request. Just a thought, have you tried out using I had a quick test and it seems to work for me. Here is my sample template:
The transformed template shows the following section where
|
Beta Was this translation helpful? Give feedback.
-
Describe your idea/feature/enhancement
It would be great if SAM could accept an explicit None in the DefaultAuthorizer when there are authorizers configured. This would be useful when I only want to set authorizers in certain environments.
Proposal
I'm not sure of the exact syntax that would be needed to not make this a breaking change, perhaps a blank string?
Beta Was this translation helpful? Give feedback.
All reactions