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?
Template validation is done against the resources available in a region. Since DAX is not currently available in ap-southeast-1, the AWS::DAX::Cluster resource will fail validation there. I have a couple of suggestions for how to make this work:
Fn:Equals:  [“DaxClusterName”, “none”]. Then use the conditional to determine whether the resources in this template can depend on the cluster.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With