@@ -3,30 +3,12 @@ Description: ACFS3 - Cert Provider with DNS validation
33Transform : AWS::Serverless-2016-10-31
44
55Resources :
6- ResourceFunction :
7- Type : AWS::Serverless::Function
8- Properties :
9- Runtime : python2.7
10- CodeUri : ../macro.zip
11- Handler : resource.handler
12- Policies : AmazonS3FullAccess
13-
14- MacroFunction :
15- Type : AWS::Serverless::Function
16- Properties :
17- Runtime : python3.6
18- CodeUri : ../macro.zip
19- Handler : macro.handler
20- Policies : AmazonS3FullAccess
21- Environment :
22- Variables :
23- LAMBDA_ARN : !GetAtt ResourceFunction.Arn
24-
25- Macro :
26- Type : AWS::CloudFormation::Macro
6+ LambdaPermission :
7+ Type : AWS::Lambda::Permission
278 Properties :
28- Name : S3Objects
29- FunctionName : !GetAtt MacroFunction.Arn
9+ Action : lambda:InvokeFunction
10+ FunctionName : !GetAtt CFNCustomProvider.Arn
11+ Principal : !GetAtt LambdaRole.Arn
3012
3113 LambdaPolicy :
3214 Type : AWS::IAM::Policy
@@ -45,17 +27,12 @@ Resources:
4527 - acm:DeleteCertificate
4628 Resource :
4729 - ' *'
48- - Effect : Allow
49- Action :
50- - lambda:InvokeFunction
51- Resource :
52- - !Sub ' arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:binxio-cfn-certificate-provider'
5330 - Effect : Allow
5431 Action :
5532 - logs:*
5633 Resource : arn:aws:logs:*:*:*
5734 Roles :
58- - !Ref ' LambdaRole'
35+ - !Ref LambdaRole
5936
6037 LambdaRole :
6138 Type : AWS::IAM::Role
@@ -80,18 +57,15 @@ Resources:
8057
8158 CFNCustomProvider :
8259 Type : AWS::Serverless::Function
83- DependsOn :
84- - LambdaRole
8560 Properties :
8661 CodeUri : s3://binxio-public-us-east-1/lambdas/cfn-certificate-provider-0.2.4.zip
8762 Description : CFN Certificate Domain Resource Record Provider
8863 MemorySize : 128
8964 Handler : provider.handler
90- Role : !GetAtt 'LambdaRole.Arn'
9165 Timeout : 300
66+ Role : !GetAtt LambdaRole.Arn
9267 Runtime : python3.6
93- FunctionName : binxio-cfn-certificate-provider
9468
9569Outputs :
9670 CFNCustomProvider :
97- Value : !GetAtt ' CFNCustomProvider.Arn'
71+ Value : !GetAtt CFNCustomProvider.Arn
0 commit comments