Skip to content

Commit d79d11a

Browse files
committed
add feedback from Jimmy
1 parent dab77ac commit d79d11a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Diff for: packages/@aws-cdk/aws-pipes-targets-alpha/lib/sns.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class SnsTarget implements ITarget {
3434
}
3535

3636
bind(pipe: IPipe): TargetConfig {
37-
if (!this.topicParameters) {
37+
if (!this.topicParameters?.inputTransformation) {
3838
return {
3939
targetParameters: {},
4040
};

Diff for: packages/@aws-cdk/aws-pipes-targets-alpha/test/sns.test.ts

+22
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,28 @@ describe('sns', () => {
5959
});
6060
});
6161

62+
it('should handle an empty parameter object', () => {
63+
// ARRANGE
64+
const app = new App();
65+
const stack = new Stack(app, 'TestStack');
66+
const topic = new Topic(stack, 'MyTopic', {});
67+
68+
const target = new SnsTarget(topic, {});
69+
70+
new Pipe(stack, 'MyPipe', {
71+
source: new TestSource(),
72+
target,
73+
});
74+
75+
// ACT
76+
const template = Template.fromStack(stack);
77+
78+
// ASSERT
79+
template.hasResourceProperties('AWS::Pipes::Pipe', {
80+
TargetParameters: {},
81+
});
82+
});
83+
6284
it('should grant pipe role publish access', () => {
6385
// ARRANGE
6486
const app = new App();

0 commit comments

Comments
 (0)