wet-fall-68417
03/20/2022, 1:39 PMaws.apigatewayv2.Api resource, using the body input, and not with the aws.apigatewayv2.Authorizer resource.
Is there a way to get the authorizer id from the aws.apigatewayv2.Api resource?
At the moment in order to make it work, we have to run pulumi up twice. First to create the authorizer, manually updating the code with its id, then running pulumi up again to create the lambda permissions.
localAuthFuncID = "as3dsc"
const localAuthSourceARN = pulumi.interpolate`arn:aws:execute-api:${region}:${account}:${APIGateWaylocal.id}/authorizers/${localAuthFuncID}`
new aws.lambda.Permission("localAuthorizerFunctionpolicylambda", {
action: "lambda:InvokeFunction",
"function": authorizerFunctionLambda.name,
principal: "<http://apigateway.amazonaws.com|apigateway.amazonaws.com>",
sourceArn: localAuthSourceARN,
statementId: "localAuthorizerFunctionpolicylambda"
})
Last time @great-queen-39697 helped me with another aws issue. Thanks!