--- AWSTemplateFormatVersion: "2010-09-09" Parameters: CodeDeployApplication: Type: String CodeDeployDeploymentGroup: Type: String PreHookLambdaFunction: Type: String LambdaFunction: Type: String Conditions: spotInstances: !Equals ['us-east-1', !Ref "AWS::Region"] Resources: ASG: Type: 'AWS::AutoScaling::AutoScalingGroup' Properties: AvailabilityZones: - us-east-1a - us-east-1b DesiredCapacity: '1' LaunchConfigurationName: Ref: LaunchConfig MaxSize: '4' MinSize: '1' UpdatePolicy: AutoScalingScheduledAction: IgnoreUnmodifiedGroupSizeProperties: 4 # invalid type AutoScalingRollingUpdate: MinInstancesInService: 1.4 # invalide type MaxBatchSize: 'a' # invalide type WaitOnResourceSignals: 'value' # invalide type PauseTime: PT10M SuspendProcesses: - ScheduledAction # missing a s ASG2: Type: 'AWS::AutoScaling::AutoScalingGroup' Properties: AvailabilityZones: - us-east-1a - us-east-1b DesiredCapacity: '1' LaunchConfigurationName: Ref: LaunchConfig MaxSize: '4' MinSize: '1' UpdatePolicy: # UPdate policy is an object not of type list - AutoScalingScheduledAction: IgnoreUnmodifiedGroupSizeProperties: True - AutoScalingRollingUpdate: MinInstancesInService: 1 MaxBatchSize: 2 WaitOnResourceSignals: True PauseTime: PT10M SuspendProcesses: - ScheduledAction # missing a s ASG3: Type: 'AWS::AutoScaling::AutoScalingGroup' Properties: AvailabilityZones: - us-east-1a - us-east-1b DesiredCapacity: '1' LaunchConfigurationName: Ref: LaunchConfig MaxSize: '4' MinSize: '1' UpdatePolicy: AutoScalingScheduledAction: IgnoreUnmodifiedGroupSizeProperties: True AutoScalingRollingUpdate: # doesn't fail when it runs into a list or non object - MinInstancesInService: 1 MaxBatchSize: 2 WaitOnResourceSignals: True PauseTime: PT10M SuspendProcesses: - ScheduledAction # missing a s FunctionVersionTwo: Type: AWS::Lambda::Version Properties: CodeSha256 : String Description : A Lambda function FunctionName : !Ref LambdaFunction Alias: Type: 'AWS::Lambda::Alias' Properties: FunctionName: !Ref LambdaFunction FunctionVersion: !GetAtt FunctionVersionTwo.Version Name: MyAlias UpdatePolicy: CodeDeployLambdaAliasUpdate: ApplicationName: !Ref CodeDeployApplication DeploymentGroupName: !Ref CodeDeployDeploymentGroup BeforeAllowTraffic: !Ref PreHookLambdaFunction # missing hook AfterAllowTrafficHook: !Ref PreHookLambdaFunction # should be indented Alias2: Type: AWS::AutoScaling::AutoScalingGroup Properties: MaxSize: '4' MinSize: '1' UpdatePolicy: CodeDeployLambdaAliasUpdate: # wrong type ApplicationName: !Ref CodeDeployApplication DeploymentGroupName: !Ref CodeDeployDeploymentGroup BeforeAllowTrafficHook: !Ref PreHookLambdaFunction # missing hook AfterAllowTrafficHook: !Ref PreHookLambdaFunction # should be indented ASG4: Type: AWS::AutoScaling::AutoScalingGroup UpdatePolicy: !If - spotInstances - AutoScalingReplacingUpdate: WillReplace: true - AutoScalingRollingUpdate: !If - spotInstances - MinInstancesInService: 1 MinSuccessfulInstancesPercent: 100 MaxBatchSize: 1 PauseTime: PT15M WaitOnResourceSignals: true SuspendProcesses: # finds errors even with much nesting of conditions - !If [spotInstances, BadHealthCheck, !Ref "AWS::NoValue"] - ReplaceUnhealthy - AZRebalance - AlarmNotification - ScheduledActions - !Ref AWS::NoValue Properties: MinSize: '1' MaxSize: '1' ESD1: Type: AWS::Elasticsearch::Domain UpdatePolicy: AutoScalingReplacingUpdate: true # wrong property name ESD2: Type: AWS::Elasticsearch::Domain UpdatePolicy: EnableVersionUpgrade: 'true'