I set up the Athena CloudTrail Partitioner and a bit after I noticed FailedInvocations in the CloudWatch Events metrics for the scheduled rule. Per https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_Troubleshooting.html#LAMfunctionNotInvoked it seems that there was a permissions policy missing on the Lambda function. I added the following CloudFormation resource to the stack and all appears to be well now.
## Permissions for CloudWatch Events to invoke the Lambda function
PartitionLambdaPolicy:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName: !Ref PartitionLambda
Principal: events.amazonaws.com
SourceArn: !GetAtt LambdaSchedule.Arn
Throwing this out there in the hope that it might help anyone else.
Hi,
I set up the Athena CloudTrail Partitioner and a bit after I noticed FailedInvocations in the CloudWatch Events metrics for the scheduled rule. Per https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_Troubleshooting.html#LAMfunctionNotInvoked it seems that there was a permissions policy missing on the Lambda function. I added the following CloudFormation resource to the stack and all appears to be well now.
Throwing this out there in the hope that it might help anyone else.
Ryan