You can use the GetItem operation for reading an item from a DynamoDB table. While performing a GetItem operation, you need to provide a table name and the primary key of the table item.
The following example shows how to read an item from the employee table using AWS CLI. In this example, employee_id is the primary key of the table:
aws dynamodb get-item \ --table-name employee \ --key '{"employee_id":{"S":"E10001"}}'
For reading an item from the table, it is necessary to specify the entire primary key. If a table has a composite key, you need to specify the partition key as well as the sort key in get-item. It performs an eventual consistent read by default; however, you can use a strongly consistent read by using the ConsistentRead parameter. Also, by default, get- item returns all the attributes...