Skip to content

aws-events-targets: KinesisFirehoseStream not accepting IDeliveryStream for imported DeliveryStream #25451

@pags

Description

@pags

Describe the bug

When trying to add a KinesisFirehoseStream target to an event Rule, an error is thrown out of the aws-iam module.

Expected Behavior

CDK will successfully create an event rule with a target of an existing Kinesis Firehose stream.

Current Behavior

An error is thrown:

util_1.sum(values.map(v => (cdk.Token.isUnresolved(v) ? tokenSize : v.length) + 3 /* quotes, separator */));

TypeError: Cannot read properties of undefined (reading 'length')
    at @aws-cdk/aws-iam/lib/policy-statement.js:551:91

Reproduction Steps

new events.Rule(this, 'rule', {
			eventPattern: {
				source: ['aws.s3'],
				detail: {
					eventName: ['PutObject'],
					requestParameters: {
						bucketName: [bucket.bucketName]
					}
				}
			}
		}).addTarget(new targets.KinesisFirehoseStream(firehose.DeliveryStream.fromDeliveryStreamArn(this, 'firehose', 'my arn here'))); 

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.77.0 (build 06a0b19)

Framework Version

No response

Node.js Version

v16.14.2

OS

Ubuntu

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions