Skip to content

Commit

Permalink
feat(dynamodb): adding on-demand-throughput to table (#30725)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Closes #30091

### Reason for this change

New DynamoDB feature that was just released

### Description of changes

Added `maxReadRequestUnits` and `maxWriteRequestUnits` for PAY_PER_REQUEST tables

### Description of how you validated changes

Tests on `integ.dynamodb.ondemand.ts`

### Checklist
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
LeeroyHannigan authored Aug 8, 2024
1 parent abc78bf commit d5a19bb
Show file tree
Hide file tree
Showing 35 changed files with 1,987 additions and 120 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"Resources": {
"GlobalTableV212B4E024": {
"Type": "AWS::DynamoDB::GlobalTable",
"Properties": {
"AttributeDefinitions": [
{
"AttributeName": "pk",
"AttributeType": "S"
},
{
"AttributeName": "sk",
"AttributeType": "N"
}
],
"BillingMode": "PAY_PER_REQUEST",
"GlobalSecondaryIndexes": [
{
"IndexName": "gsi2",
"KeySchema": [
{
"AttributeName": "pk",
"KeyType": "HASH"
}
],
"Projection": {
"ProjectionType": "ALL"
},
"WriteOnDemandThroughputSettings": {
"MaxWriteRequestUnits": 2001
}
}
],
"KeySchema": [
{
"AttributeName": "pk",
"KeyType": "HASH"
},
{
"AttributeName": "sk",
"KeyType": "RANGE"
}
],
"Replicas": [
{
"GlobalSecondaryIndexes": [
{
"IndexName": "gsi2",
"ReadOnDemandThroughputSettings": {
"MaxReadRequestUnits": 2001
}
}
],
"ReadOnDemandThroughputSettings": {
"MaxReadRequestUnits": 222
},
"Region": "us-east-1"
},
{
"GlobalSecondaryIndexes": [
{
"IndexName": "gsi2",
"ReadOnDemandThroughputSettings": {
"MaxReadRequestUnits": 2001
}
}
],
"Region": "eu-west-1"
}
],
"StreamSpecification": {
"StreamViewType": "NEW_AND_OLD_IMAGES"
},
"TableName": "my-global-table-v2",
"WriteOnDemandThroughputSettings": {
"MaxWriteRequestUnits": 10
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d5a19bb

Please sign in to comment.