Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Created November 18, 2020 00:59
Show Gist options
  • Save thanakijwanavit/42469e797d38fe7a6abdf105588e6739 to your computer and use it in GitHub Desktop.
Save thanakijwanavit/42469e797d38fe7a6abdf105588e6739 to your computer and use it in GitHub Desktop.
dynamodb specifiction in cloudformation or sam
MainDatabase:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: ib_prcode
AttributeType: S
- AttributeName: needUpdate
AttributeType: S
BillingMode: PAY_PER_REQUEST
GlobalSecondaryIndexes:
- IndexName: "need-update"
KeySchema:
- AttributeName: needUpdate
KeyType: HASH
Projection:
ProjectionType: ALL
KeySchema:
- AttributeName: ib_prcode
KeyType: HASH
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true
TableName: !Join [ "-" , ["inventory-database", !Ref BRANCH]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment