# SecondaryIndexProps

Properties for a secondary index.

- Source: [`aws-dynamodb/lib/shared.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-dynamodb/lib/shared.ts#L331)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
const secondaryIndexProps: dynamodb.SecondaryIndexProps = {
  indexName: 'indexName',

  // the properties below are optional
  nonKeyAttributes: ['nonKeyAttributes'],
  projectionType: dynamodb.ProjectionType.KEYS_ONLY,
};
```

## Properties

- `indexName`: string (required) — The name of the secondary index.

- `nonKeyAttributes`: string[] — The non-key attributes that are projected into the secondary index.

  **Default:** No additional attributes

- `projectionType`: [ProjectionType](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.ProjectionType.html) = ALL — The set of attributes that are projected into the secondary index.
