How to add authorization in the serverless.ts file as we do in serverless.yml file
Serverless.ts
apiGateway: {
minimumCompressionSize: 1024,
shouldStartNameWithService: true,
}
Serverless.yml
MyApi:
Type: AWS::Serverless::Api
Properties:
StageName: dev
Auth:
DefaultAuthorizer: MyLambdaTokenAuthorizer
Authorizers:
MyLambdaTokenAuthorizer:
FunctionArn: !GetAtt MyAuthFunction.Arn
Please help me out finding way to attach the lambda authorization.