I have created HTTPapi and have integrated with the application load balancer, all this is working using CFT.
Now I wanted to add the authorizer to the API endpoint, I am able to implement it through console. But I am not able to figure out by CFT.
Documentation of Authorizer: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html
CFT for reference, currently I am receiving error as "Invalid Authorizer URI:
I have given the arn of lambda function.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The template for API authorization.",
"Parameters": {
"projectName": {
"Type": "String",
"Default": "test"
},
"apiId": {
"Type": "String"
},
"lambdaAuthArn": {
"Type": "String"
}
},
"Resources": {
"authorizer": {
"Type": "AWS::ApiGatewayV2::Authorizer",
"Properties": {
"ApiId": {
"Ref": "apiId"
},
"AuthorizerUri": {
"Ref": "lambdaAuthArn"
},
"AuthorizerType": "REQUEST",
"Name": {
"Fn::Sub": "${projectName}-auth"
}
}
}
},
"Outputs": {
"authorizerId": {
"Description": "The Authorizer's ID.",
"Value": {
"Ref": "authorizer"
}
}
}
}
Can you give an example of the AuthorizerUri you're using?