File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ Parameters:
2525 LambdaName :
2626 Type : String
2727 Description : Name of lambda we are creating for
28+ LambdaArn :
29+ Type : String
30+ Description : Arn of lambda we are creating resources for.
31+ Default : none
2832 LogRetentionDays :
2933 Type : Number
3034 Description : How long to keep logs for
@@ -58,6 +62,18 @@ Conditions:
5862 ShouldUseSplunk : !Equals [true, !Ref EnableSplunk]
5963
6064Resources :
65+ ExecuteLambdaManagedPolicy :
66+ Type : AWS::IAM::ManagedPolicy
67+ Properties :
68+ PolicyDocument :
69+ Version : 2012-10-17
70+ Statement :
71+ - Effect : Allow
72+ Action :
73+ - lambda:InvokeFunction
74+ Resource :
75+ - !Sub ${LambdaArn}:*
76+
6177 LambdaRole :
6278 Type : " AWS::IAM::Role"
6379 Properties :
@@ -105,6 +121,11 @@ Resources:
105121 DestinationArn : !Ref SplunkDeliveryStream
106122
107123Outputs :
124+ ExecuteLambdaPolicyArn :
125+ Description : Lambda execution policy arn
126+ Value : !GetAtt ExecuteLambdaManagedPolicy.PolicyArn
127+ Export :
128+ Name : !Join [":", [!Ref "AWS::StackName", "FHIRValidatorUKCoreExecuteLambdaPolicyArn"]]
108129 LambdaRoleArn :
109130 Description : " LambdaRole ARN"
110131 Value : !GetAtt LambdaRole.Arn
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ Resources:
4949 SplunkDeliveryStream : !ImportValue lambda-resources:SplunkDeliveryStream
5050 EnableSplunk : " true"
5151 LambdaName : !Sub "${AWS::StackName}-FHIRValidatorUKCore"
52+ LambdaArn : !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${AWS::StackName}-FHIRValidatorUKCore
5253 LogRetentionDays : !Ref LogRetentionDays
5354
5455 FHIRValidatorUKCore :
You can’t perform that action at this time.
0 commit comments