Hello, I’m trying to create an aws lambda permissi...
# general
w
Hello, I’m trying to create an aws lambda permissions resource. I want to pass it the ID of the api gateway authorizer. The thing is I create the authorizer with
aws.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.
Copy code
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!