aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

feat: Add POCOs for S3 object events

Open rpf3 opened this issue 3 years ago • 4 comments

This commit adds POCOs to model S3 object events routed via EventBridge.

closes #1072

rpf3 avatar Feb 03 '22 23:02 rpf3

@rpf3 It would be nice to add some test cases as well. Please refer existing ones as a reference.

ashishdhingra avatar Feb 24 '22 20:02 ashishdhingra

@rpf3 Also refer https://docs.aws.amazon.com/AmazonS3/latest/userguide//ev-events.html, detail could have additional details based on operation. Few examples:

  • deletion-type for delete operation
  • restore-expiry-time and source-storage-class for object restore completed.

S3ObjectEventDetails class perhaps needs to be modeled accordingly, perhaps might want to create subclasses for each scenario.

ashishdhingra avatar Mar 22 '22 18:03 ashishdhingra

@ashishdhingra I've pushed some new models as you requested. Is this more in line with what you were thinking?

rpf3 avatar May 30 '22 15:05 rpf3

@ashishdhingra I've pushed some new models as you requested. Is this more in line with what you were thinking?

@rpf3 Thanks. Could you also add some unit tests as well as requested in https://github.com/aws/aws-lambda-dotnet/pull/1073#issuecomment-1050236089.

ashishdhingra avatar Jul 07 '22 23:07 ashishdhingra

I manually added unit tests, change size to be a long from an int and added DataContract attributes to fix serialization with Newtonsoft. I'll work on getting this PR released soon.

normj avatar Feb 12 '23 02:02 normj

This PR has been released as part of version 4.1.0 of Amazon.Lambda.CloudWatchEvents. Thanks for the PR!

normj avatar Feb 13 '23 07:02 normj