How can Cloudformation send an s3 notification for an existing bucket to SQS?
I know how to send the notification to a lambda handler, but not sure how to do this for SQS. I also know I can send it to SQS if I create the bucket resource in Cloudformation and use NotificationConfiguration, but that's not an option for me, as the bucket already exists in another terraform config. The queue is also created in terraform.
I currently send the notification to a lambda proxy that then posts it to SQS, but that is not ideal.
Function:
some_function:
handler: app.apis.some_function.handler
events:
- s3:
bucket: ${self:custom.someBucket} # arn var for existing bucket
event: s3:ObjectCreated:*
rules:
- prefix: "some_prefix/"
existing: true
Is there a way to adjust this config to send the notification directly to SQS instead of a lambda handler that acts as a proxy to SQS?