Filtering by a composite primary key
A composite key supports searching for a specific value in the hash attribute, and can include searching on the range attribute as well. Searching on both attributes narrows a search. When a composite primary key is defined for a table, Amazon DynamoDB uses its Query API to search on the key index only. This type of search is typically efficient.
If you select a table that uses a composite primary key, the query page of the data set editor displays the Searchable by Composite Key option, as shown in Figure 8-3. This option is disabled if the selected table uses a hash primary key.
Figure 8-3  
In this example, the hash attribute is ForumName and the range attribute is Subject. You can select one or both of these attributes on which to filter. Each attribute you select creates a corresponding data set parameter, as shown in Figure 8-4.
Figure 8-4  
You must edit each data set parameter to specify the attribute value to search. Figure 8-5 shows searching for the value Amazon DynamoDB in the ForumName hash attribute.
Figure 8-5  

Additional Links:

Copyright Actuate Corporation 2012