What is the primary difference between a global secondary index and a local secondary index?
1. The global secondary index is not region specific 2. There are no differences 3. A global secondary index has the same hash key as the primary key and the local secondary index has a different hash and range key 4. A local secondary index has the same hash key as the primary key and the global secondary index has a different hash and range key
Correct Answer : 4
Explanation: Some applications only need to query data using the tables primary key; however, there may be situations where an alternate range key would be helpful. To give your application a choice of range keys, you can create one or more local secondary indexes on a table and issue Query requests against these indexes.
DynamoDB stores all of the items with the same hash key contiguously.
Some requests might require more complex data access patterns. For example:
Which forum threads get the most views and replies? Which thread in a particular forum has the largest number of messages? How many threads were posted in a particular forum within a particular time period?
To answer these questions, the Query action would not be sufficient. Instead, you would have to Scan the entire table. For a table with millions of items, this would consume a large amount of provisioned read throughput and take a long time to complete.
However, you can specify one or more local secondary indexes on non key attributes, such as Replies or LastPostDateTime.
A local secondary index maintains an alternate range key for a given hash key. A local secondary index also contains a copy of some or all of the attributes from the table; you specify which attributes are projected into the local secondary index when you create the table. The data in a local secondary index is organized by the same hash key as the table, but with a different range key. This lets you access data items efficiently across this different dimension. For greater query flexibility, you can create up to five local secondary indexes per table.
Suppose that an application needs to find all of the threads that have been posted within the last three months. Without a local secondary index, the application would have to Scan the entire Thread table and discard any posts that were not within the specified time frame. With a local secondary index, a Query operation could use LastPostDateTime as a range key and find the data quickly.
Question :
Company B has a DynamoDB table where the average item size is 10KB. Company B anticipates the application will read 100 items from the table per second using eventually consistent reads. How much read capacity throughput should they provision?
1. 100 2. 300 3. 150 4. 200
Correct Answer : 3
Explanation: Eventually consistent reads require half the throughput of strongly consistent reads. In order to determine how much throughput capacity is required follow the formula below. ( 100 x (10/4) ) / 2= 150 We take the number of reads per second multiplied by 10KB in size / 4KB (rounded up) throughput capacity size. Since eventually consistent reads require half the throughput we then take that and divide it by 2.
Question :
How many tables can an AWS account have per region?
1. 255 2. 126 3. 282 4. 256
Correct Answer : 4 Table limits can be increased by contacting AWS
By default, the number of tables per account is limited to 256 per region. However, you can request an increase in this limit.