-
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
HTTP API authorizer does not set "Invoke permissions" #2933
Comments
Thanks for reporting the issues, we'll look into the problem and work on a fix |
Looks like SAM HttpApi doesn't automatically create a Lambda Permissions resource that allows the API resource to invoke the authorizer Lambda (SAM RestApi creates this permissions resource automatically when
You shouldn't need to define the |
The PR is merged and the change will be releasing in the coming weeks. |
This was a huge help. Took forever for me to figure out this issue. Especially since, if you run it locally, everything works, and it isn't very intuitive because none of the SAM templates you see in examples have an additional role or permission. |
For anyone looking for a quick solution (using the mentioned merged PR), just put this in your
My SAM template was written with the help of:
This is how my HttpApi Resource looks like:
|
This is largely a duplicate of #2005 but I am opening a new issue for visibility.
Put simply, REST API behaves as expected, but HTTP API does not. This setting, "Invoke permissions" does not seem to be settable via SAM, regardless of whether
FunctionInvokeRole
is set.Here is a snippet of my template:
If I do not set a function role explicitly, I expect one to be created for me, setting the proper policy for API GW to invoke the function, similar to this:
If I uncomment the function role above, the role is created, but the above "Invoke permissions" setting is still not active.
The text was updated successfully, but these errors were encountered: