aws / aws/aws-cdk

`@aws-cdk/aws-pipes-sources-alpha`: adding `deadLetterTarget` results in a failed update

Open
#31,664 12 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-pipes-sources-alpha bug effort/medium p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

I successfully deployed the following Stack:

```ts
const ddbTable = new TableV2(this, "DDBTable", {
tableName: "ddb-table",
partitionKey: {
name: "Location",
type: AttributeType.STRING,
},
dynamoStream: StreamViewType.NEW_AND_OLD_IMAGES,
removalPolicy: RemovalPolicy.DESTROY,
});

const queue = new Queue(this, "Queue", {
retentionPeriod: Duration.days(14),
});

const dlq = new Queue(this, "DLQ", {
retentionPeriod: Duration.days(14),
});

const pipeSource = new DynamoDBSource(ddbTable, {
startingPosition: DynamoDBStartingPosition.LATEST,
batchSize: 1,
maximumRetryAttempts: 0,
// deadLetterTarget: dlq,
});

new Pipe(this, "Pipe", {
source: pipeSource,
target: new SqsTarget(queue),
});
```

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

_No response_

### Expected Behavior

Expected `deadLetterTarget` property to work correctly.

### Current Behavior

After uncommenting the `deadLetterTarget` property and deploying again, I get the following error:

```sh
9:12:13 AM | UPDATE_FAILED | AWS::Pipes::Pipe | PipeBFF4E827
Resource handler returned message: "Resource of type 'AWS::Pipes::Pipe' with identifier 'PipeBFF4E827-kvcogRY98bn1' did not stabilize. Status Reason is Input parameter is invalid from the request due to : Error occurred while sending mes
sage to SQS queue: arn:aws:sqs:eu-central-1::dlq" (RequestToken: 07f6ec0d-8398-4a70-f9db-4c2870efa33d, HandlerErrorCode: NotStabilized)

❌ cdk-aws-webhook-momento-dev failed: The stack named cdk-aws-webhook-momento-dev failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "Resource of type 'AWS::Pipes::Pipe' with identifier 'PipeBFF4E827-kvcogRY98bn1' did not stabilize. Status Reason is Input parameter is invalid from the request due to : Error occurred while sending message to SQS queue: arn:aws:sqs:eu-central-1::dlq" (RequestToken: 07f6ec0d-8398-4a70-f9db-4c2870efa33d, HandlerErrorCode: NotStabilized)
👾 Task "deploy" failed when executing "cdk deploy" (cwd: /home/user/github/cdk-aws-webhook-momento)
```

### Reproduction Steps

See above.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.161.1

### Framework Version

_No response_

### Node.js Version

20.18.0

### OS

Ubuntu 24.04

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failed update using the TypeScript example with DynamoDBSource, Pipe, SqsTarget, and deadLetterTarget enabled. Start by tracing how deadLetterTarget is handled for the AWS::Pipes::Pipe resource and compare the generated deployment configuration with the reported SQS stabilization error. Done means updating the stack succeeds with the dead-letter queue configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.