Anyone know how to set reportBatchItemFailures to ...
# help
g
Anyone know how to set reportBatchItemFailures to true on a version of the cdk that doesnt support it yet? (for sqs consumer)
f
is it supported in a more recent CDK version?
g
It is yes, the only docs it lets me view it is supported
I'm still on 1.126.0 right now though
Figured it out:
Copy code
// eslint-disable-next-line no-extra-parens
const eventSource = redriveQueue.consumerFunction?.node.children.find(child => (child.node.defaultChild as cdk.CfnResource)?.cfnResourceType === 'AWS::Lambda::EventSourceMapping')

// eslint-disable-next-line no-extra-parens
;(eventSource?.node.defaultChild as CfnEventSourceMapping).addPropertyOverride('FunctionResponseTypes', ['ReportBatchItemFailures'])