When trying to add an authoriser to an api gateway...
# aws
w
When trying to add an authoriser to an api gateway route I get this Error:
updating API Gateway v2 route (ion6q9r): BadRequestException: Invalid authorizer ID specified. Setting the authorization type to CUSTOM or COGNITO_USER_POOLS requires a valid authorizer.
If I set it up manually it works, but doesn’t through pulumi. Any idea why?``
Copy code
const authorizer = await aws.lambda.getFunction({
  functionName: 'testAuth',
 });

 const route = new aws.apigatewayv2.Route(`${STACK_NAME}-route`, {
  authorizerId: authorizer.id,
  authorizationType: 'CUSTOM',
  routeKey: 'ANY /{id}/recpies/{recipeId}',
  apiId: httpApi.id,
  target: pulumi.interpolate`integrations/${integration.id}`,
 });
``````