Answer – C
Some applications might need to perform many kinds of queries, using a variety of different attributes as query criteria. To support these requirements, you can create one or more global secondary indexes and issue
Query
requests against these indexes in Amazon DynamoDB.To speed up queries on non-key attributes, you can create a global secondary index. A global secondary index contains a selection of attributes from the base table, but they are organized by a primary key that is different from that of the table. The index key does not need to have any of the key attributes from the table. It doesn`t even need to have the same key schema as a table.
Option A is incorrect because creating another table is costly and unnecessary.
Option B is incorrect because UserName cannot be the primary key.
Option C is CORRECT because, as mentioned above, creating a global secondary index on UserName would allow the user to efficiently access the table via querying on this attribute rather than UserID which is the primary key.
Option D is incorrect because DynamoDB tables are partitioned based on the primary key, and you cannot make UserName as the primary key.
AWS Reference Docs:
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html