cloudtools / troposphere

troposphere - Python library to create AWS CloudFormation descriptions
BSD 2-Clause "Simplified" License
4.93k stars 1.45k forks source link

Serverless Api Function events should use ApiFunctionAuth instead of Api Auth #2144

Closed vvangestel closed 1 year ago

vvangestel commented 1 year ago

There is currently only one Auth class defined in serverless.py. This class is used by both the Api class as well as ApiEvent class, the expected properties of these objects does not however match.

See https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-api-apiauth.html, versus https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-apifunctionauth.html.

Another class should be created to provide support for the ApiFunctionAuth entity.