How to make my lambda function public (not authorization)

I have a function that i want to make public, so, not any authorization needed to trigger.
i tried removing the authorizer section from function body and also setting it to :
authorizer: ‘NONE’

but no luck,
any ideas on how to do that?

It should work by just removing the authorizer part of serverless.yml but there are a number of other configuration details which also must work in AWS to make your lambda publicly reachable, for instance your VPC and subnet. To begin you can go to your lambda function in the AWS web ui and try test it from its lambda web ui and also set the VPC and subnet from there. Or more preferably also set those details in serverless.yml as well.

Thanks for your reply,
I just wanna make sure that every single function can have its own authorizer settings, and its not on the serverless.yml level ?!

Yes, every function (or event) can have its own authorizer. (It is not on the top-level.)

I might be able to post an example for you if you can not find any good example

1 Like