Skip to content

Instantly share code, notes, and snippets.

@shaykav
Last active March 25, 2021 21:14
Show Gist options
  • Save shaykav/b64163d060e583923d1770ff18bbd7bd to your computer and use it in GitHub Desktop.
Save shaykav/b64163d060e583923d1770ff18bbd7bd to your computer and use it in GitHub Desktop.
resources:
Resources:
connectionsTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: CONNECTION_TABLE
AttributeDefinitions:
- AttributeName: id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
subscriptionsTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: SUBSCRIPTION_TABLE
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: topic
AttributeType: S
- AttributeName: connectionId
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
- AttributeName: topic
KeyType: RANGE
GlobalSecondaryIndexes:
- IndexName: ConnectionIndex
KeySchema:
- AttributeName: connectionId
KeyType: HASH
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
- IndexName: TopicIndex
KeySchema:
- AttributeName: topic
KeyType: HASH
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment