Yes the SAM CLI can be used to develop lambda authorizers with caveats. The SAM CLI was created for developing general purpose Lambda functions -- not authorizers. Because of this not all SAM features are usable for authorizer development. Also, SAM commands that do work may output spurious errors. Specifically this behavior is due to the fact that authorizers have different input parameters (events) and return values than general purpose Lambda functions.
Hear is how to work around these differences:
The example event in the "events" folder will need to be replaced by an appropriate event type for the specific configuration of API Gateway you are using. There are three different event schemas:
HTTP API Gateway Version 1, REST API Gateway Request Authorization
HTTP API Gateway Version 2
REST API Gateway Token Authorization
Running a local server with the "sam local start-api" command does not work. This is because the event that start-api composes is not the appropriate type for an authorizer.