AWS EventBridge Rule Not Triggering Lambda Function in Specific Region After Deployment
I've encountered a strange issue with I'm having trouble with an AWS EventBridge rule that should trigger a Lambda function, but it doesn't seem to work after I deployed my CloudFormation stack in a specific region (us-west-2). The rule is configured to capture events from an S3 bucket and forward them to my Lambda function, but I can see that the event is not reaching the function at all. I've checked the permissions, and the Lambda function role has the necessary permissions to be invoked by EventBridge. Hereโs the relevant part of my CloudFormation template: ```yaml Resources: MyLambdaFunction: Type: 'AWS::Lambda::Function' Properties: Handler: index.handler Role: !GetAtt MyLambdaExecutionRole.Arn Code: ZipFile: | exports.handler = async (event) => { console.log('Event:', JSON.stringify(event)); }; Runtime: nodejs14.x MyEventRule: Type: 'AWS::Events::Rule' Properties: EventPattern: source: - "aws.s3" detail-type: - "AWS API Call via CloudTrail" resources: - !Sub "arn:aws:s3:::my-bucket" Targets: - Arn: !GetAtt MyLambdaFunction.Arn Id: "TargetFunction" MyLambdaPermission: Type: 'AWS::Lambda::Permission' Properties: Action: "lambda:InvokeFunction" FunctionName: !Ref MyLambdaFunction Principal: "events.amazonaws.com" SourceArn: !GetAtt MyEventRule.Arn ``` I've double-checked that the event pattern matches the events being generated by the S3 bucket, and I can see those events in CloudTrail. However, my Lambda function is not logging anything, which indicates it's never being invoked. Iโve also tried redeploying the stack and manually reconfiguring the EventBridge rule in the console, but that didnโt help either. Is there something I'm missing? Any insights would be greatly appreciated! For context: I'm using Yaml on Debian.