AWSTemplateFormatVersion: '2010-09-09' Resources: LambdaRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: [{Action: 'sts:AssumeRole', Effect: Allow, Principal: {Service: lambda.amazonaws.com}}] Version: 2012-10-17 ManagedPolicyArns: ['arn:aws:iam::aws:policy/AWSLambdaExecute'] LambdaFunction: Type: AWS::Lambda::Function Properties: Description: taskcat functional test Runtime: python3.7 Code: ZipFile: | import cfnresponse def handler(event, context): status = cfnresponse.SUCCESS cfnresponse.send(event, context, status, {}, 'test-id') Handler: index.handler MemorySize: 128 Timeout: 10 Role: !GetAtt LambdaRole.Arn CustomResource: Type: "Custom::Resource" Properties: ServiceToken: !GetAtt LambdaFunction.Arn