Note: If your question is regarding the AWS Amplify Console service, please log it in the
official AWS Amplify Console forum
Which Category is your question related to?
AMPLIFY API ( DynamoDB / Model )
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
4.18.1
What AWS Services are you utilizing?
AWS AMPLIFY, DYNAMODB, LAMBDA, CLOUD FORMATION
Provide additional details e.g. code snippets
When creating a type annotated with @model, a DynamoDB table is created as follow :
the tableName + a unique random identifier + AWS environment.
I'm trying to use a cloud formation template & lambda scripts in order to interact with those tables, unfortunately, the unique random identifier changes each time I update the model ( as instance when editing dynamodb tale indexes
is there any way to force the table name or the identifier number, or is there any API that allows retrieving the dynamodb name dynamically.
type myTable
@model
{
myField: ID!
label : String
}
@MehdiTAZI that is currently not possible it is something that we'll look into as part of @model enhancements.
DynamoDB does not have a monotonically incrementing id type, for auto id uuidv4 is the suggested value and that is what the generated resolvers are utilizing and providing this functionality.
Thanks for your reactivity.
Most helpful comment
@MehdiTAZI that is currently not possible it is something that we'll look into as part of
@modelenhancements.DynamoDB does not have a monotonically incrementing id type, for auto id uuidv4 is the suggested value and that is what the generated resolvers are utilizing and providing this functionality.