Last active
March 12, 2023 11:52
-
-
Save kunduso/cc445a7d9dccc6f0e6dc2f10af927852 to your computer and use it in GitHub Desktop.
The aws cli to create a dynamodb table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# table name: Terraform-backend-lock | |
aws dynamodb create-table --table-name Terraform-backend-lock --attribute-definitions AttributeName=LockID,AttributeType=S --key-schema AttributeName=LockID,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 | |
#output | |
{ | |
"TableDescription": { | |
"AttributeDefinitions": [ | |
{ | |
"AttributeName": "LockID", | |
"AttributeType": "S" | |
} | |
], | |
"TableName": "Terraform-backend-lock", | |
"KeySchema": [ | |
{ | |
"AttributeName": "LockID", | |
"KeyType": "HASH" | |
} | |
], | |
"TableStatus": "CREATING", | |
"CreationDateTime": "2021-04-01T06:51:56.076000-05:00", | |
"ProvisionedThroughput": { | |
"NumberOfDecreasesToday": 0, | |
"ReadCapacityUnits": 5, | |
"WriteCapacityUnits": 5 | |
}, | |
"TableSizeBytes": 0, | |
"ItemCount": 0, | |
"TableArn": "arn:aws:dynamodb:us-east-2:$(AWSAccountNumber):table/Terraform-backend-lock", | |
"TableId": "9f2312ba-01ae-4f9a-9ea2-b179ffa780b2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
very very very thank you. your snippet is the only working solution for terraform+dynamodb !!