- Newest
- Most votes
- Most comments
To create a V2019 of DynamoDB Global Table, you need to use the CreateTable
API and NOT the CreateGlobalTable
API.
When DynamoDB moved to v2019 it aligned with the table class, which is why you are seeing the creation of v2017 using the global table class.
Once you create the table, you call UpdateTable
and specify the ReplicaUpdates
aws dynamodb create-table \
--table-name custT \
--attribute-definitions AttributeName=pk,AttributeType=S AttributeName=sk,AttributeType=S \
--key-schema AttributeName=pk,KeyType=HASH AttributeName=sk,KeyType=RANGE \
--billing-mode PAY_PER_REQUEST
aws dynamodb wait table-exists \
--table-name custT
aws dynamodb update-table \
--table-name custT \
--replica-updates '[{"Create": {"RegionName": "eu-west-2"}}]'
I just created a new table and replicas which are the 2019 version. What version of the SDK and CLI are you using? Which region is the primary DynamoDB table in?
Thank you for the reply.. Did you create through AWS Console ? I am using aws-sdk-go-v2 SDK .. Also you can use aws CLI to create table and to create global table with two replicas .. When i do create createGlobalTable dynamoDB version becomes 2017..
aws --version aws-cli/2.8.10 Python/3.10.8 Darwin/21.6.0 source/arm64 prompt/off
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.17.7
I used the AWS CLI: aws-cli/2.4.18 Python/3.8.8 Darwin/21.6.0 exe/x86_64 prompt/off
Which regions are you using? I created my primary table in ap-southeast-2 and replicas in us-east-1 and eu-west-1.
Thank you for the reply.. Did you create through AWS Console ? I am using aws-sdk-go-v2 SDK .. Also you can use aws CLI to create table and to create global table with two replicas .. When i do create createGlobalTable dynamoDB version becomes 2017..
Relevant content
- asked 2 years ago
- asked 8 months ago
- asked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 7 months ago
Hi Leeroy,
Thank you so much for the solution. It unblocked me..
Best Regards Nagappa
That's good to hear Nagappa, please feel free to mark the answer as accepted.
Accepted Now.. Thank you ..