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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cloudwatch logs event #188

Merged
merged 2 commits into from
Dec 22, 2017
Merged

Conversation

toshi0607
Copy link
Contributor

@toshi0607 toshi0607 commented Dec 17, 2017

overview

I'd like to add event class for CloudWatch Logs event so that I wrote some files by reference to other classes such as Amazon.Lambda.ConfigEvents.

background

Events from CloudWatch Logs are not so complicated like below.

{
 "awslogs": {
 "data":"H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41whwWQRIctmEcB6sQbFC3CjW3XW8kxpOpP+OC22d1Wml1qZkQGtoMsScxaczKN3plG8zlaHIta5KqWsozoTYw3/djzwhpLwivWFGHGpAFe7DL68JlBUk+l7KSN7tCOEJ4M3/qOI49vMHj+zCKdlFqLaU2ZHV2a4Ct/an0/ivdX8oYc1UVX860fQDQiMdxRQEAAA=="
 }
 }

But, people using Lambdas triggered by CloudWatch Logs events have to define the class for the events every time . So I think this PR helps people saving time.

issue

I wonder if you could open this on Visual Studio. So would you open this pull request on your IDE?
If you open this successfully and you think this kind of PR is not bad , I' ll add tests for CloudWatchLogsEvents class.

@toshi0607 toshi0607 changed the title WIP add cloudwatch logs event [WIP] add cloudwatch logs event Dec 17, 2017
@toshi0607 toshi0607 closed this Dec 17, 2017
@toshi0607 toshi0607 reopened this Dec 17, 2017
@toshi0607 toshi0607 changed the title [WIP] add cloudwatch logs event add cloudwatch logs event Dec 17, 2017
@normj
Copy link
Member

normj commented Dec 22, 2017

Thanks for the pull request. I haven't been able to do a thorough look at it but it looks like a good addition. I'll do a more thorough look at it soon but I didn't want you to think the pull request was being ignored.

@toshi0607
Copy link
Contributor Author

Thanks a lot! I don't care even if it takes a long time to review. I'm willing to improve codes in this PR if there are problems.

@normj normj merged commit cbc0894 into aws:master Dec 22, 2017
@normj
Copy link
Member

normj commented Dec 23, 2017

I pushed out 1.0.0 version of the NuGet package. I renamed the Data property to EncodedData and added DecodeData() utility method to make it easier to get the plain text version of the data.

Thanks again for the pull request.

@toshi0607
Copy link
Contributor Author

Great! When I implemented this project, I also added the method for decoding. I appreciate the addition of EncodedData property!
https://github.com/toshi0607/ErrorNotificationLambda/blob/master/ErrorNotificationLambda/Function.cs#L66-L98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants