diff --git a/stacks/aggregator-stack.js b/stacks/aggregator-stack.js index 9c14126..a7e8832 100644 --- a/stacks/aggregator-stack.js +++ b/stacks/aggregator-stack.js @@ -66,11 +66,11 @@ export function AggregatorStack({ stack, app }) { // Guarantee exactly-once processing // (Note: maximum 10 batch) fifo: true, - // During the deduplication interval (10 minutes), Amazon SQS treats + // During the deduplication interval (12 minutes), Amazon SQS treats // messages that are sent with identical body content contentBasedDeduplication: true, queueName: `${bufferQueueName}.fifo`, - visibilityTimeout: Duration.minutes(10) + visibilityTimeout: Duration.minutes(12) } }, }) @@ -191,15 +191,15 @@ export function AggregatorStack({ stack, app }) { aggregatorBufferStoreBucket, aggregateOfferQueue ], - timeout: '10 minutes', - memorySize: '4 GB' + timeout: '12 minutes', + memorySize: '6 GB' }, deadLetterQueue: bufferQueueDLQ.cdk.queue, cdk: { eventSource: { // we can reduce most buffers possible at same time to avoid large buffers to create huge congestion on the queue while being processed. - // also makes less lambda calls and decreases overall execution time. - batchSize: 3, + // also makes fewer lambda calls and decreases overall execution time. + batchSize: 2, // allow reporting partial failures reportBatchItemFailures: true, },