title: Dynamo DB Attribute type boolean
body: <p>Why can an attribute definition only be of types `{string, number, binary).</p>
  
  <p>See 
   Java SDK class <code>com.amazonaws.services.dynamodbv2.model.AttributeDefinition</code> or <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeDefinition.html" rel="nofollow noreferrer">documentation</a>.</p>
  
  <p>What if I am trying to define a boolean attribute of type <code>BOOL</code> as mentioned <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.DataTypes.html" rel="nofollow noreferrer">here</a> or <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes%22%20%20*%20%3EData%20Types" rel="nofollow noreferrer">here</a> as a distinct type from a number (perhaps this is already the problem, maybe I shouldn't be trying to do this?)</p>
  
  <p>I'm not clear why I cannot define the attribute type explicitly as <code>BOOL</code>. Is this because it's actually just a number <code>0/1</code>? I would have assumed the above, had it not been for other documentation which talks about booleans as distinct type and annotations in the Java SDK like <code>com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBConvertedBool</code> or <code>@DynamoDBTyped(DynamoDBMapperFieldModel.DynamoDBAttributeType.BOOL)</code> which again seems to indicate that there is some type of distinct definition that can be used.</p>