dynamodb-alarms-plugin
v0.1.3
Published
Serverless plugin to create read/write capacity alarms for all DynamoDB tables.
Downloads
1
Maintainers
Readme
Create Cloudwatch alarms for all DynamoDB tables' read and write capacity.
Usage
In Serverless template:
plugins:
- dynamodb-alarms-plugin
custom:
dynamo-alarms:
ReadCapacityPercent: 80
WriteCapacityPercent: 80
Period: 60
EvaluationPeriods: 1
TopicName: snsNotificationTopic
Example
service: dynamo-alarm-plugin
provider:
name: aws
runtime: nodejs6.10
stage: ${opt:stage, 'dev'}
region: us-east-1
plugins:
- dynamodb-alarms-plugin
custom:
dynamo-alarms:
ReadCapacityPercent: 80
WriteCapacityPercent: 80
Period: 60
EvaluationPeriods: 1
TopicName: snsNotificationTopic
resources:
Resources:
snsNotificationTopic:
Type: AWS::SNS::Topic
Properties:
DisplayName: DynamoErrorsToSns
Subscription:
- Endpoint: [email protected]
Protocol: email
tableToWatch:
Type: AWS::DynamoDB::Table
Properties:
TableName: table-alarm-test-${self:provider.stage}
AttributeDefinitions:
- AttributeName: recordId
AttributeType: S
KeySchema:
- AttributeName: recordId
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: '5'
WriteCapacityUnits: '5'
Tags:
- Key: MyTag1
Value: MyTagValue1