From e56c4717abc243bcc37614e1595ff42e300f9f10 Mon Sep 17 00:00:00 2001 From: Sam Weston Date: Thu, 8 Oct 2020 11:58:03 +0100 Subject: [PATCH] Add Lambda Permission policy to allow CloudWatch Events to trigger the Lambda --- cf/template.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cf/template.yml b/cf/template.yml index 0b70ff0..727ac75 100644 --- a/cf/template.yml +++ b/cf/template.yml @@ -253,4 +253,14 @@ Resources: Arn: Fn::GetAtt: - PartitionLambda - - Arn \ No newline at end of file + - Arn + + ## 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 +