File tree 1 file changed +3
-11
lines changed
packages/@aws-cdk/aws-pipes-targets-alpha/lib
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export interface KinesisTargetParameters {
24
24
}
25
25
26
26
/**
27
- * A EventBridge Pipes target that sends messages to a Kinesis stream.
27
+ * An EventBridge Pipes target that sends messages to a Kinesis stream.
28
28
*/
29
29
export class KinesisTarget implements ITarget {
30
30
private stream : IStream ;
@@ -44,12 +44,6 @@ export class KinesisTarget implements ITarget {
44
44
}
45
45
46
46
bind ( pipe : IPipe ) : TargetConfig {
47
- if ( ! this . streamParameters ) {
48
- return {
49
- targetParameters : { } ,
50
- } ;
51
- }
52
-
53
47
return {
54
48
targetParameters : {
55
49
inputTemplate : this . streamParameters . inputTransformation ?. bind ( pipe ) . inputTemplate ,
@@ -60,9 +54,7 @@ export class KinesisTarget implements ITarget {
60
54
}
61
55
62
56
function validatePartitionKey ( pk : string ) {
63
- if ( ! Token . isUnresolved ( pk ) ) {
64
- if ( pk . length > 256 ) {
65
- throw new Error ( `Partition key must be less than or equal to 256 characters, received ${ pk . length } ` ) ;
66
- }
57
+ if ( ! Token . isUnresolved ( pk ) && pk . length > 256 ) {
58
+ throw new Error ( `Partition key must be less than or equal to 256 characters, received ${ pk . length } ` ) ;
67
59
}
68
60
}
You can’t perform that action at this time.
0 commit comments