Hello, I'm trying to get a Cloudwatch Event to tr...
# python
w
Hello, I'm trying to get a Cloudwatch Event to trigger a lambda function. After creating my Lambda, Event and Event target, all with Pulumi, I create a Lambda Permission: https://www.pulumi.com/docs/reference/pkg/aws/lambda/permission/
Copy code
# Allow cloudwatch to invoke lambda
        lambda_permission = lambda_.Permission(
            resource_name=f"{project}-{env}-status-lambda-permissions",
            action="lambda:InvokeFunction",
            function=status_lambda.name,
            principal="<http://events.amazonaws.com|events.amazonaws.com>",
            source_arn=event_target.arn
        )
A resource is created in the stack, but if I go to the Management Console and check my lambda, there is no trigger configured. All invocations from Cloudwatch fail. If I proceed to manually create a trigger from the Management Console, everything works as expected. Do any of you know what's wrong ? Am I maybe using the wrong Pulumi resource type ?