title: How can I specify in cloudformation yaml file to use parameter value otherwise a default via FindInMap
body: <p>Say I have an ecs.yml file that specifies a lookup mapping for a hostname to set in an environment JAVA_OPTIONS value. The lookup key is an account Id value that is used for another setting. But I want to be able to override the use of the map in some usages of the template.  </p>
  
  <pre><code>  AccId:
       Type: String
    AccountMap:
       DomainName:
            "01" :"https://production.example.com",
            "02" :"https://test.example.com",
            "03" :"https://pref.example.com"
  </code></pre>
  
  <p>and have</p>
  
  <pre><code> TaskDefinition:
      Type: AWS::ECS::TaskDefinition
          Properties:
             ...&lt;snip&gt;...
             Environment: 
                   - Name: JAVA_OPTIONS
                     Value: !Sub
                       - "-DSERVER_HOST=${ServerHost} -DACC=${AccId}"
                       - !FindInMap [AccountMap, "ServerHost", !Ref "AccId"], AccId: !Ref AccId
  </code></pre>
  
  <p>But I'd like to have another template parameter i.e <code>SeverHostOveride</code> that overrides the use of the AccountMap lookup for setting the ServerHost if SeverHostOveride has a value.</p>
  
  <pre><code>  ServerHostOveride:
         Type:String 
         Default:''
  </code></pre>