-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate 'from_sns' #87
base: master
Are you sure you want to change the base?
Conversation
At time of writing the code SNS did not support raw message body delivery. (https://docs.aws.amazon.com/sns/latest/dg/sns-large-payload-raw-message-delivery.html) So a Message delivered from S3-> SNS to SQS had an additional Header. The Original message was in payload['Message']. Thank you for your idea… |
I see, that makes a lot of sense. I did spend some time searching to try understand, knew there must've been a reason why you added it. 😁 I guess if it's possible that someone might turn this feature off voluntarily (for whatever) reason we can add a special flag to support that use case. Maybe Happy to alter the PR to add this. |
Signed-off-by: Ashley Primo <ashley.primo@transferwise.com>
18a3dc7
to
2e9c8eb
Compare
How is this latest commit @christianherweg0807 |
Bump @cherweg / @christianherweg0807 - would be great to get this, or a derivative solution in mainstream to make configuration nicer. 🙂 |
Sorry, I’ll be back at the keyboard in 2 Weeks.Von meinem iPhone gesendetAm 01.03.2024 um 08:59 schrieb Ashley Primo ***@***.***>:
How is this latest commit @christianherweg0807
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Context
This PR is (at-least initially-hence draft) intended to be a discussion, as I do not fully understand why
from_sns
is needed, as far as I can tell the payload format whenS3->SNS->SQS
architecture is deployed, the payload resembles the following:Which is inline with https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-content-structure.html
So, attempting to
payload = JSON.parse(payload['Message']) if @from_sns
will fail as of course, the JSON structure does not match that expectation.There are number of issues I have seen, related to this:
Why removal?
I do not currently understand how this payload would ever be nested within
payload['Message']
; though if there is a case where this would be the case - we should improve documentation to reflect this, and probably the naming of the variable.Currently,
from_sns
needs to equalfalse
even when the data does originate from SNS - contrary to the comment in codeWhether the event is processed though an SNS to SQS. (S3>SNS>SQS = true |S3>SQS=false)
(and inference made in documentation)@cherweg maybe you will know if I am missing something here?