I am testing DynamoDB tables and want to set up different table names for prod and dev environment using the prefix \"dev_\" for development.
I made this test to print t
I've faced the same situation and struggled with myself a couple of days to get that working.
Just in case you're using DynamoDB + Spring here is what worked for me:
POJO class:
@DynamoDBTable(tableName = "APP-ACCESSKEY")
public class AccessKey {
@NotBlank
@Size(min = 1, max = 36)
private String accessToken;
@NotNull
@Size(min = 3, max = 15)
private String userName;
private Date dateInsertion;
public AccessKey() {
// ... All POJO stuff
}
Spring configuration:
Explanation:
Taking into account that my AccessKey object point to APP-ACCESSKEY table on AWS DynamodDB then it turns out that after running this, your application will start to point to DES-APP-ACCESSKEY.
Hope it helps someone who's facing a situation akin to it
Cheers