CloudFormation, apply Condition on DependsOn
问题 The task that I need to do is make CDN depend on a S3 bucket. But we want to make it use the existing bucket rather than creating a new one. Here is the sample code that I am trying: "Parameters" : { "UseExistingBucket" : { "Description" : "Yes/No", "Default" : "yes", "Type" : "String", "AllowedValues" : [ "yes", "no" ] } }, "Conditions" : { "CreateS3Resources" : {"Fn::Equals" : [{"Ref" : "UseExistingBucket"}, "no"]} }, "Resources" : { "StaticBucket" : { "Type" : "AWS::S3::Bucket", "Condition