Hello There’s some features either missing or not ...
# sst
n
Hello There’s some features either missing or not yet covered in the docs, e.g. how to configure the Lambda onError target to an SQS as DLQ; although it is possible to use actual CDK in this same config, so that may cover it; But was wondering if someone here can point me in the right direction
s
You're right, there are features missing. The team is adding features fairly quickly and is quite responsive if they learn of a use case that needs support. In the meantime, I've been using CDK directly to "fill the gaps" as needed.
For example, here's how I'm mixing CDK with SST to create an SQS queue with a DLQ
Copy code
this.mainQueue = new sqs.Queue(this, "MainQueue", {
          deadLetterQueue: {
            maxReceiveCount: 1,
            queue: new sqs.Queue(this, "DeadLetterQueue")
          }
        });

        this.webhookQueue = new sst.Queue(this, "WebhookQueue", {
          consumer: myWebhookHandler,
          sqsQueue: this.mainQueue
        });
n
oh great, thanks a lot
f
Thanks @Seth Geoghegan!
@Norman Khine You can use the
sst.Function
and
sst.Queue
construct and do something like:
Copy code
const queue = new sst.Queue(this, "FunctionDLQ");
const lambda = new sst.Function(this, "Function", {
  handler: "src/lambda.main",
  deadLetterQueue: queue.sqsQueue,
});
n
that's cool, thank you