awslabs / amazon-kinesis-scaling-utils

The Kinesis Scaling Utility is designed to give you the ability to scale Amazon Kinesis Streams in the same way that you scale EC2 Auto Scaling groups – up or down by a count or as a percentage of the total fleet. You can also simply scale to an exact number of Shards. There is no requirement for you to manage the allocation of the keyspace to Shards when using this API, as it is done automatically.
Apache License 2.0
338 stars 95 forks source link

I can't receive SNS notification for scale up action #99

Open EJSohn opened 3 years ago

EJSohn commented 3 years ago

This is my configuration file

  [
    {
      "streamName": "staging-sb_log_stream",
      "region": "ap-northeast-2",
      "scaleOnOperation": [
        "PUT"
      ],
      "minShards": 2,
      "maxShards": 10,
      "refreshShardsNumberAfterMin": 5,
      "checkInterval": 60,
      "scaleUp": {
        "scaleThresholdPct": 70,
        "scaleAfterMins": 5,
        "scalePct": 150,
        "coolOffMins": 5,
        "notificationARN": "arn:aws:sns:ap-northeast-2:account-id:staging-kinesis-auto-scaling-sns-topic"
      },
      "scaleDown": {
        "scaleThresholdPct": 40,
        "scaleAfterMins": 120,
        "scalePct": 70,
        "coolOffMins": 30,
        "notificationARN": "arn:aws:sns:ap-northeast-2:account-id:staging-kinesis-auto-scaling-sns-topic"
      }
    },
    {
      "streamName": "staging-billing_stream",
      "region": "ap-northeast-2",
      "scaleOnOperation": [
        "PUT"
      ],
      "minShards": 2,
      "maxShards": 10,
      "refreshShardsNumberAfterMin": 5,
      "checkInterval": 60,
      "scaleUp": {
        "scaleThresholdPct": 70,
        "scaleAfterMins": 5,
        "scalePct": 150,
        "coolOffMins": 5,
        "notificationARN": "arn:aws:sns:ap-northeast-2:account-id:staging-kinesis-auto-scaling-sns-topic"
      },
      "scaleDown": {
        "scaleThresholdPct": 40,
        "scaleAfterMins": 120,
        "scalePct": 70,
        "coolOffMins": 30,
        "notificationARN": "arn:aws:sns:ap-northeast-2:account-id:staging-kinesis-auto-scaling-sns-topic"
      }
    }
  ]

I want to get notified whenever the scale action happens but I'm only getting a notification about the scale down action even if the scale-up has already happened.

{"layout":{"shardId-000000000021":{"streamName":"staging-billing_stream","startHash":0,"endHash":113427455640312821154458202477256070484,"hashWidth":113427455640312821154458202477256070484,"pctOfKeyspace":33.333%,"shardID":"shardId-000000000021"},"shardId-000000000026":{"streamName":"staging-billing_stream","startHash":113427455640312821154458202477256070485,"endHash":170141183460469231731687303715884105727,"hashWidth":56713727820156410577229101238628035242,"pctOfKeyspace":16.667%,"shardID":"shardId-000000000026"},"shardId-000000000027":{"streamName":"staging-billing_stream","startHash":170141183460469231731687303715884105728,"endHash":226854911280625642308916404954512140969,"hashWidth":56713727820156410577229101238628035241,"pctOfKeyspace":16.667%,"shardID":"shardId-000000000027"},"shardId-000000000024":{"streamName":"staging-billing_stream","startHash":226854911280625642308916404954512140970,"endHash":340282366920938463463374607431768211455,"hashWidth":113427455640312821154458202477256070485,"pctOfKeyspace":33.333%,"shardID":"shardId-000000000024"}},"operationsMade":0,"scaleDirection":"NONE","endStatus":"AlreadyAtMinimum"}