@@ -585,7 +585,7 @@ const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
585
585
586
586
const globalTable = new dynamodb .TableV2 (stack , ' GlobalTable' , {
587
587
partitionKey: { name: ' pk' , type: dynamodb .AttributeType .STRING },
588
- // applys to all replicas, i.e., us-west-2, us-east-1, us-east-2
588
+ // applies to all replicas, i.e., us-west-2, us-east-1, us-east-2
589
589
removalPolicy: cdk .RemovalPolicy .DESTROY ,
590
590
replicas: [
591
591
{ region: ' us-east-1' },
@@ -749,7 +749,7 @@ const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
749
749
],
750
750
});
751
751
752
- // grantReadData only applys to the table in us-west-2 and the tableKey
752
+ // grantReadData only applies to the table in us-west-2 and the tableKey
753
753
globalTable .grantReadData (user );
754
754
```
755
755
@@ -779,7 +779,7 @@ const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
779
779
],
780
780
});
781
781
782
- // grantReadData applys to the table in us-east-2 and the key arn for the key in us-east-2
782
+ // grantReadData applies to the table in us-east-2 and the key arn for the key in us-east-2
783
783
globalTable .replica (' us-east-2' ).grantReadData (user );
784
784
```
785
785
@@ -815,7 +815,7 @@ new cloudwatch.Alarm(this, 'Alarm', {
815
815
The ` replica ` method can be used to generate a metric for a specific replica table:
816
816
817
817
``` ts
818
- import * as cdk form ' aws-cdk-lib' ;
818
+ import * as cdk from ' aws-cdk-lib' ;
819
819
import * as cloudwatch from ' aws-cdk-lib/aws-cloudwatch' ;
820
820
821
821
class FooStack extends cdk .Stack {
@@ -824,7 +824,7 @@ class FooStack extends cdk.Stack {
824
824
public constructor (scope : Construct , id : string , props : cdk .StackProps ) {
825
825
super (scope , id , props );
826
826
827
- this .globalTable = new dynamodb .Tablev2 (this , ' GlobalTable' , {
827
+ this .globalTable = new dynamodb .TableV2 (this , ' GlobalTable' , {
828
828
partitionKey: { name: ' pk' , type: dynamodb .AttributeType .STRING },
829
829
replicas: [
830
830
{ region: ' us-east-1' },
@@ -834,7 +834,7 @@ class FooStack extends cdk.Stack {
834
834
}
835
835
}
836
836
837
- interface BarStack extends cdk .StackProps {
837
+ interface BarStackProps extends cdk .StackProps {
838
838
readonly replicaTable: dynamodb .ITableV2 ;
839
839
}
840
840
0 commit comments