< BACK TO BLOG

#LearningUpdate What I have learned on 03/01/2023

Published Wed Mar 01 2023



Work with the Auto-Enabled IO volume attribute

When Amazon EBS determines that a volume's data is potentially inconsistent, it disables I/O to the volume from any attached EC2 instances by default.






Characteristic Global secondary index Local secondary index Key Schema The primary key of a global secondary index can be either simple (partition key) or composite (partition key and sort key). The primary key of a local secondary index must be composite (partition key and sort key). Key Attributes The index partition key and sort key (if present) can be any base table attributes of type string, number, or binary. The partition key of the index is the same attribute as the partition key of the base table. The sort key can be any base table attribute of type string, number, or binary. Size Restrictions Per Partition Key Value There are no size restrictions for global secondary indexes. For each partition key value, the total size of all indexed items must be 10 GB or less. Online Index Operations Global secondary indexes can be created at the same time that you create a table. You can also add a new global secondary index to an existing table, or delete an existing global secondary index. For more information, see Managing Global Secondary Indexes. Local secondary indexes are created at the same time that you create a table. You cannot add a local secondary index to an existing table, nor can you delete any local secondary indexes that currently exist. Queries and Partitions A global secondary index lets you query over the entire table, across all partitions. A local secondary index lets you query over a single partition, as specified by the partition key value in the query. Read Consistency Queries on global secondary indexes support eventual consistency only. When you query a local secondary index, you can choose either eventual consistency or strong consistency. Provisioned Throughput Consumption Every global secondary index has its own provisioned throughput settings for read and write activity. Queries or scans on a global secondary index consume capacity units from the index, not from the base table. The same holds true for global secondary index updates due to table writes. A global secondary index associated with global tables consumes write capacity units. Queries or scans on a local secondary index consume read capacity units from the base table. When you write to a table its local secondary indexes are also updated, and these updates consume write capacity units from the base table. A local secondary index associated with global tables consumes replicated write capacity units. Projected Attributes With global secondary index queries or scans, you can only request the attributes that are projected into the index. DynamoDB does not fetch any attributes from the table. If you query or scan a local secondary index, you can request attributes that are not projected in to the index. DynamoDB automatically fetches those attributes from the table.




Subscribe to my Newsletter

Get the latest posts delivered right to your inbox