[英]Unable to create subscription filter to KinesisStream using AWS CDK
我想 stream 从 cloudwatch 到 S3 的一些日志。 为此,我通过 CDK 创建了资源。 与 Kinesis 相关的代码是 -
const rootStream = new Stream(this, 'Root', {
streamName: `stream-name`
});
const firehoseRole = new Role(this, `some-id`, {
assumedBy: new ServicePrincipal('firehose.amazonaws.com'),
roleName: `some-role-name`
});
rootStream.grantRead(firehoseRole);
rootStream.grant(firehoseRole, 'kinesis:DescribeStream');
const firehoseStreamToS3 = new CfnDeliveryStream(...);// omitted the large config
const subFilterDestination = new KinesisDestination(rootStream);
const subFilter = new SubscriptionFilter(this, 'xyz', {
destination: subFilterDestination,
filterPattern: FilterPattern.literal('some=pattern'),
logGroup: myLogGroup
});
subFilter.node.addDependency(myLogGroup);
在部署期间我收到错误
X:XX:XX PM | CREATE_FAILED | AWS::Logs::SubscriptionFilter | LogProcessingFilterXYZABC
Resource handler returned message: "Could not deliver test message to specified Kinesis stream. Check if the given kinesis strea
m is in ACTIVE state. (Service: CloudWatchLogs, Status Code: 400, Request ID: abcdef-bbbb-cccc-dddd-xxxxxxxxx)" (RequestTok
en: xxxxxxxxxxxxxxxx, HandlerErrorCode: InternalFailure)
此错误的原因是什么以及如何解决?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.