PAY_PER_REQUEST
apiVersion: dynamodb.aws.crossplane.io/v1alpha1
kind: Table
metadata:
name: demo-table
spec:
forProvider:
region: ap-northeast-2
attributeDefinitions:
- attributeName: id
attributeType: S
# - attributeName: timestamp
# attributeType: S
keySchema:
- attributeName: id
keyType: HASH
# - attributeName: timestamp
# keyType: RANGE
# Note that due to a quirk of the DynamoDB API if you change billing mode
# from PROVISIONED to PAY_PER_REQUEST you must also set readCapacityUnits
# and writeCapacityUnits to 0.
billingMode: PAY_PER_REQUEST
# streamSpecification:
# streamEnabled: true
# streamViewType: NEW_AND_OLD_IMAGES
providerConfigRef:
name: aws-provider
YAML
복사
kubectl apply -f dynamodb.yaml
Shell
복사
kubectl get table
Shell
복사
PROVISIONED
apiVersion: dynamodb.aws.crossplane.io/v1alpha1
kind: Table
metadata:
name: demo-table
spec:
forProvider:
region: ap-northeast-2
attributeDefinitions:
- attributeName: id
attributeType: S
# - attributeName: timestamp
# attributeType: S
keySchema:
- attributeName: id
keyType: HASH
# - attributeName: timestamp
# keyType: RANGE
# Note that due to a quirk of the DynamoDB API if you change billing mode
# from PROVISIONED to PAY_PER_REQUEST you must also set readCapacityUnits
# and writeCapacityUnits to 0.
billingMode: PROVISIONED
provisionedThroughput:
readCapacityUnits: 1
writeCapacityUnits: 1
# streamSpecification:
# streamEnabled: true
# streamViewType: NEW_AND_OLD_IMAGES
providerConfigRef:
name: aws-provider
YAML
복사
kubectl apply -f dynamodb.yaml
Shell
복사
kubectl get table
Shell
복사