Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created April 13, 2018 22:16
Show Gist options
  • Save adrianhall/f285969f36a972b5339a0e0c738813ca to your computer and use it in GitHub Desktop.
Save adrianhall/f285969f36a972b5339a0e0c738813ca to your computer and use it in GitHub Desktop.
CloudFormation resource template for a DynamoDB table
DynamoDBNotesTable:
Type: "AWS::DynamoDB::Table"
Description: "Data store for AWS AppSync Notes Type"
Properties:
TableName: !Sub ${APIName}-notes-table
AttributeDefinitions:
- AttributeName: "NoteId"
AttributeType: "S"
- AttributeName: "UserId"
AttributeType: "S"
KeySchema:
- AttributeName: "NoteId"
KeyType: "HASH"
- AttributeName: "UserId"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment