aws-sdk-rust
aws-sdk-rust copied to clipboard
[request]: Add types to deserialize SES S3 Action SNS notification events
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":"[email protected]",
"messageId":"3rsfhsr2l6g08h0ddqs4f9ribuvfp4lpf4rqb6o8",
"destination":[
"[email protected]"
],
"headersTruncated":false,
"headers":[
...
],
"commonHeaders":{
...
}
},
"receipt":{
"timestamp":"2022-02-10T04:25:13.995Z",
"processingTimeMillis":721,
"recipients":[
"[email protected]"
],
"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
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.
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.