Example of enabling streaming functionality of DynamoDB table using SAM resource
An example of how to enable streaming functionality of DynamoDB table in template.yaml of your SAM configuration
YourDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: 'google-trends'
AttributeDefinitions:
- AttributeName: yourAttribute1
AttributeType: S
- AttributeName: yourAttribute2
AttributeType: S
KeySchema:
- AttributeName: yourAttribute1
KeyType: HASH
- AttributeName: yourAttribute2
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
StreamSpecification:
StreamViewType: NEW_IMAGEPreviousSchema to create a resource of DynamoDB table using SAMNextSchema to create Lambda function resource using SAM
Last updated