0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AWSのcloudFormaitonでのkinesis firehose作成でエラーログが出力されないとき

Posted at

cloudformationでkinesis firehoseのエラーログを出力するよう設定したがcloud watchにログが出力されない問題を調査した。

結論

cloud watchのlogGroupだけじゃなく、logStreamも作成しなければならなかった。

cloudwatch
Resources:
    FirehoseErrLogGroup:
        Type: AWS::Logs::LogGroup
        Properties:
            LogGroupName: "aws/kinesisfirehose/errLogGroup"
    FirehoseErrLogStream:
        Type: AWS::Logs::LogStream
        Properties:
            LogGroupName: !Ref FirehoseErrLogGroup
            LogStreamName: "ErrorLogStream"

firehoseのエラーログはマネージドコンソールで作成すれ場合自動で作成されるが、
cfnやaws cliで作成する場合は事前に作成する必要があった。

You can enable Kinesis Data Firehose error logging through the AWS CLI, the API, or AWS CloudFormation using the CloudWatchLoggingOptions configuration. To do so, create a log group and a log stream in advance. We recommend reserving that log group and log stream for Kinesis Data Firehose error logging exclusively. Also ensure that the associated IAM policy has "logs:putLogEvents" permission. For more information, see Controlling Access with Amazon Kinesis Data Firehose .
公式ドキュメント

ちゃんと見てれば気づけたなと反省。。。

参考

https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-logs.html
https://qiita.com/horietakehiro/items/a414d6a00d3a549ffce5
https://dev.classmethod.jp/articles/cloudwatch-logs-to-s3-via-kinesis-data-firehose/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?