Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Lambda permissions policy missing #3

@rynjms

Description

@rynjms

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.

## 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.

Ryan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions