--- AWSTemplateFormatVersion: "2010-09-09" Description: > DependsOn Conditions: defaultRegion: !Equals [!Ref "AWS::Region", "us-east-1"] Resources: myInstance1: Type: AWS::EC2::Instance Properties: ImageId: String myInstance2: DependsOn: badInstance Type: AWS::EC2::Instance Properties: ImageId: String myInstance3: DependsOn: - badInstance Type: AWS::EC2::Instance Properties: ImageId: String myInstance4: DependsOn: - Resource: badInstance Type: AWS::EC2::Instance Properties: ImageId: String myInstance5: Type: AWS::EC2::Instance DependsOn: myInstance4 Properties: ImageId: String Tags: - Key: "Dependency" Value: !Ref "myInstance4" - Key: "GetAtt" Value: !GetAtt [ myInstance4, AvailabilityZone ] myInstance6: Type: AWS::EC2::Instance Condition: defaultRegion Properties: ImageId: String myInstance7: Type: AWS::EC2::Instance DependsOn: - myInstance6 Properties: ImageId: String