Created
June 15, 2021 19:22
-
-
Save bensie/f0bd57e5f000f31b3be622b646183e97 to your computer and use it in GitHub Desktop.
CloudFormation - Generic DynamoDB table schema
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
AWSTemplateFormatVersion: "2010-09-09" | |
Resources: | |
Table: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
AttributeDefinitions: | |
- AttributeName: PK | |
AttributeType: S | |
- AttributeName: SK | |
AttributeType: S | |
- AttributeName: GSI1PK | |
AttributeType: S | |
- AttributeName: GSI1SK | |
AttributeType: S | |
- AttributeName: GSI2PK | |
AttributeType: S | |
- AttributeName: GSI2SK | |
AttributeType: S | |
- AttributeName: GSI3PK | |
AttributeType: S | |
- AttributeName: GSI3SK | |
AttributeType: S | |
BillingMode: PAY_PER_REQUEST | |
KeySchema: | |
- AttributeName: PK | |
KeyType: HASH | |
- AttributeName: SK | |
KeyType: RANGE | |
GlobalSecondaryIndexes: | |
- IndexName: GSI1 | |
KeySchema: | |
- AttributeName: GSI1PK | |
KeyType: HASH | |
- AttributeName: GSI1SK | |
KeyType: RANGE | |
Projection: | |
ProjectionType: ALL | |
- IndexName: GSI2 | |
KeySchema: | |
- AttributeName: GSI2PK | |
KeyType: HASH | |
- AttributeName: GSI2SK | |
KeyType: RANGE | |
Projection: | |
ProjectionType: ALL | |
- IndexName: GSI3 | |
KeySchema: | |
- AttributeName: GSI3PK | |
KeyType: HASH | |
- AttributeName: GSI3SK | |
KeyType: RANGE | |
Projection: | |
ProjectionType: ALL | |
PointInTimeRecoverySpecification: | |
PointInTimeRecoveryEnabled: true | |
TimeToLiveSpecification: | |
AttributeName: ExpiresAt | |
Enabled: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment