Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request]: Add types to deserialize SES S3 Action SNS notification events #445

Closed
TuhinNair opened this issue Feb 10, 2022 · 2 comments
Closed
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@TuhinNair
Copy link

A note for the community

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Tell us about your request

Types to help deserialize the SES Receipt Rule S3 Action's optional SNS notification.

Tell us about the problem you're trying to solve.

I setup a SES Receipt Rule S3 Action with the optional SNS notification. This notification is delivered to a SQS Queue. The message body of the Queue message is an encoded JSON string. This string needs to be deserialized into a Rust struct. There are many fields and there's a risk of getting it wrong when modelling based on a small sample size. This is also something if done once can be reused by all users as opposed to everyone having to model this for their use.

Here's an example of the JSON:

{

   "notificationType":"Received",

   "mail":{

      "timestamp":"2022-02-10T04:25:13.995Z",

      "source":"abcd@xyz.com",

      "messageId":"3rsfhsr2l6g08h0ddqs4f9ribuvfp4lpf4rqb6o8",

      "destination":[

         "test@example.com"

      ],

      "headersTruncated":false,

      "headers":[
...
],

      "commonHeaders":{
...
}

   },

   "receipt":{

      "timestamp":"2022-02-10T04:25:13.995Z",

      "processingTimeMillis":721,

      "recipients":[

         "test@example.com"

      ],

      "spamVerdict":{

         "status":"PASS"

      },

      "virusVerdict":{

         "status":"PASS"

      },

      "spfVerdict":{

         "status":"PASS"

      },

      "dkimVerdict":{

         "status":"PASS"

      },

      "dmarcVerdict":{

         "status":"PASS"

      },

      "action":{

         "type":"S3",

         "topicArn":"arn:aws:sns:us-east-1:<account-id>:mail_received_topic",

         "bucketName":"mail_received_bucket",

         "objectKey":"3rsfhsr2l6g08h0ddqs4f9ribuvfp4lpf4rqb6o8"

      }

   }

}

Are you currently working around this issue?

I couldn't find the exact Struct needed in this repo so I use a combination of types from the unofficial aws-lambda-events crate and added my own wrapper type to fit the exact shape of the received notification.

Additional context

No response

@TuhinNair TuhinNair added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 10, 2022
@jdisanti jdisanti removed the needs-triage This issue or PR still needs to be triaged. label Feb 10, 2022
@Velfi
Copy link
Contributor

Velfi commented Feb 14, 2022

Thanks for submitting this. People have submitted similar issues in the past so things like this are on the team's radar. However, this isn't currently our highest priority so it might be a while before we address this need. In the meantime, if you have any specific questions related to this issue, don't hesitate to create a discussion post.

@jmklix jmklix added the p2 This is a standard priority issue label Nov 28, 2022
@jmklix jmklix closed this as completed May 10, 2024
Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants