Skip to content

Instantly share code, notes, and snippets.

@singledigit
Created August 11, 2020 23:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save singledigit/ff53ba765eee2299abf9a891df10778b to your computer and use it in GitHub Desktop.
Using a DynamoDB CloudFormation resource in a SAM template to add range.
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: DDB example
Resources:
Table:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: timestamp
AttributeType: S
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: id
KeyType: HASH
- AttributeName: timestamp
KeyType: RANGE
StreamSpecification:
StreamViewType: NEW_AND_OLD_IMAGES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment