From eb53ddd7c0332c483dcbe64263a22c3e35b13be2 Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Mon, 24 May 2021 11:49:14 -0400 Subject: [PATCH] Attempting to add events permission --- application.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/application.yaml b/application.yaml index 203b44d..4ef66b5 100644 --- a/application.yaml +++ b/application.yaml @@ -109,6 +109,7 @@ Resources: Policies: - AWSCodePipelineReadOnlyAccess - AWSLambdaBasicExecutionRole + - !Ref EventsPolicy - KMSDecryptPolicy: KeyId: !Ref EncryptionKeyId Events: @@ -442,6 +443,19 @@ Resources: Effect: Allow Resource: "*" + # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html + EventsPolicy: + Type: AWS::IAM::ManagedPolicy + Properties: + Description: ManageEvents + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Action: + - events:Describe* + Resource: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${ApplicationStackName}" + # More info about Outputs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html Outputs: StatusFunction: