I have an api gateway configuration with cognito authorization. I enabled a general proxy path for all my api calls which end up with v1.
So all api resources under v1 need to be authorized.
But I have a couple of endpoints which I don't need authorization for, since they are webhooks which will be called by 3rd parties.
How can I add a policy to make an exception for these endpoints (resources) so that I can access them without any authorization.
I tried to add a policy as follows:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "execute-api:Invoke",
"Resource": "{myResourceIds}/*/POST/stripe/connect/webhook"
}
]
}
For instance when I call my api with /stripe/connect/webhook
I don't want any authorization for that path. How can I acomplish this ?