https://serverless-stack.com/ logo
#help
Title
# help
s

sforman

05/31/2022, 3:01 PM
because if I do
Copy code
const stream = new KinesisStream(stack, "Stream", {
    consumers: {
      consumer1: {
        function: {
          handler: "functions/lambda.handler",
          timeout: 5,
          retryAttempts: 5
        },
      },
    },
  });
with the function that will timeout
Copy code
export const handler: any = async (event) => {
  console.log("Run");
  await sleep(20000);
};

function sleep(ms) {
  return new Promise((resolve) => {
    setTimeout(resolve, ms);
  });
}
it times out, but doesn't retry - same goes for throwing errors, no retry
c

Carlos Daniel

05/31/2022, 3:36 PM
I worked once with Kinesis and one of the reasons I moved to SQS was that I think it’s easier to work with the retries and dead-letter queues… if it fits to your case I’d say to go for that as well
f

Frank

05/31/2022, 5:28 PM
@sforman is this happening on
sst start
or after u
sst deploy
?
4 Views