Skip to content

Dynamic specification of index name on @DynamoDbSecondaryPartitionKey annotation #6253

@scottcarter87

Description

@scottcarter87

Describe the feature

Provide the ability to dynamically specify the name of the index when using the @DynamoDbSecondaryPartitionKey which today only allows for static definition of the index name.

Use Case

I need to be able to dynamically provide the name of the index in a Spring Boot application since our index names have an environment name component to them. Currently the @DynamoDbSecondaryPartitionKey annotation requires a static name of the index so this is not possible.

Proposed Solution

Establish a new DynamoDbSecondaryIndexNameProvider interface and update the annotation to accept a static name or any implementing class of DynamoDbSecondaryIndexNameProvider so the name can be determined at runtime.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.31.77

JDK version used

21

Operating System and version

macOS Sequoia 15.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions