Amazon DynamoDB Operations: Difference between revisions
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
Properties: | Properties: | ||
AttributeDefinitions: | AttributeDefinitions: | ||
- AttributeName: | - AttributeName: kv/key | ||
AttributeType: S | |||
- AttributeName: kv/index1 | |||
AttributeType: S | |||
- AttributeName: kv/index2 | |||
AttributeType: S | |||
BillingMode: String | BillingMode: String | ||
GlobalSecondaryIndexes: | GlobalSecondaryIndexes: |
Revision as of 00:06, 25 April 2019
Internal
CLI
aws dynamodb create-table \ --table-name some-table --attribute-definitions AttributeName=kv/key,AttributeType=S AttributeName=kv/index1,AttributeType=S AttributeName=kv/index2,AttributeType=S \ --key-schema AttributeName=kv/key,KeyType=HASH \ --sse-specification Enabled=true,SSEType=KMS \ --global-secondary-indexes 'IndexName=kv_index1,KeySchema=[{AttributeName=kv/index1,KeyType=HASH}],Projection={ProjectionType=KEYS_ONLY}' 'IndexName=kv_index2,KeySchema=[{AttributeName=kv/index2,KeyType=HASH}],Projection={ProjectionType=KEYS_ONLY}' \ --billing-mode PAY_PER_REQUEST \ --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES
CloudFormation Support
AWS::DynamoDB::Table
Resources: DyamoDBTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: kv/key AttributeType: S - AttributeName: kv/index1 AttributeType: S - AttributeName: kv/index2 AttributeType: S BillingMode: String GlobalSecondaryIndexes: - GlobalSecondaryIndexes KeySchema: - KeySchema LocalSecondaryIndexes: - LocalSecondaryIndexes PointInTimeRecoverySpecification: PointInTimeRecoverySpecification ProvisionedThroughput: ProvisionedThroughput SSESpecification: SSESpecification StreamSpecification: StreamSpecification TableName: String Tags: - Resource Tag TimeToLiveSpecification: TimeToLiveSpecification