I have a template to create a CloudFormation with DynamoDB and DAX for multiple regions, for example, us-east-1 and ap-southeast-1. While working for us-east-1, this template would not work for ap-southeast-1 since DAX is not yet available for that region.
I expected that this could be done using Conditions
, so that for one region (us-east-1) I would have both DynamoDB and DAX and for another one (ap-southeast-1) - only DynamoDB:
Conditions:
isDAXAvailable: !Not [!Equals [ !Ref "AWS::Region", ap-southeast-1 ]]
Resources:
DynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
.....
DaxCluster:
Type: AWS::DAX::Cluster
Condition: isDAXAvailable
Properties:
.....
But unfortunately I receive an error:
An error occurred (ValidationError) when calling the ValidateTemplate operation: Template format error: Unrecognized resource types: [AWS::DAX::Cluster]
Is it possible to configure such template anyhow or a separate one should be created?