Conditions:
DBInstanceLaunch:
IsFirstPrimaryAZ:
Fn::Equals:
- !Ref DBAvailabilityZone
- Fn::Select:
- 0
- Fn::GetAZs: ''
When I try to upload this, I get "Template error: Cannot use Fn::GetAZs in Conditions" I checked in the docs, Fn::GetAZs is supported by Conditions. I am trying to do what is mentioned in this answer: RDS with Cloud Formation and AZ issues
CodePudding user response:
I checked in the docs, Fn::GetAZs is supported by Conditions.
No its not supported. Fn::GetAZs
can only be used with Fn::If
, which is not the same as Conditions
section in CloudFormation.