Final answer:
A Global Secondary Index (GSI) in DynamoDB is used to accelerate queries on non-primary key attributes.
Step-by-step explanation:
A Global Secondary Index (GSI) in DynamoDB is used to accelerate queries on non-primary key attributes.
When you create a GSI, you can specify a set of attributes from the table to be projected into the index. This allows you to query the index directly using these attributes without the need to scan the entire table.
For example, if you have a table of books with attributes like title, author, and publication year, you can create a GSI on the author attribute. This will allow you to query the GSI to find all books by a specific author without having to scan the entire table.