Authorizer Caching

You can cache the authorizer with the ttl convenience property. This means the Authorizer lambda function will not be called again until the ttl expires. Example:

authorizer(
  name: "MainProtect",  # required
  ttl: 60,
)

The ttl option is shorthand for the authorizer_result_ttl_in_seconds property associated with the CloudFormation ApiGateway::Authorizer properties.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub, and contributions are encouraged and welcomed. We love pull requests from you!