Hello, I’m trying to create an aws lambda permissi...
# general
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
resource, using the body input, and not with the
resource. Is there a way to get the authorizer id from the
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!