{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "LogDeliveryToFirehose",
      "Effect": "Allow",
      "Action": [
        "firehose:PutRecord",
        "firehose:PutRecordBatch",
        "firehose:ListTagsForDeliveryStream"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/LogDeliveryEnabled": "true"
        }
      }
    },
    {
      "Sid": "KMSForFirehoseSSECMK",
      "Effect": "Allow",
      "Action": [
        "kms:GenerateDataKey",
        "kms:Decrypt"
      ],
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "kms:ViaService": "firehose.*.amazonaws.com"
        }
      }
    }
  ]
}
