Skip to content

Feature request: AWS Config Rule event data class #1667

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

Closed
2 tasks done
ctacka opened this issue Oct 28, 2022 · 9 comments · Fixed by #2175
Closed
2 tasks done

Feature request: AWS Config Rule event data class #1667

ctacka opened this issue Oct 28, 2022 · 9 comments · Fixed by #2175
Assignees
Labels
event_sources Event Source Data Class utility feature-request feature request

Comments

@ctacka
Copy link

ctacka commented Oct 28, 2022

Use case

Lambda functions could be used by AWS Config Custom Rules
AWS Config Event (one of 3 types) will be passed as event.

Solution/User Experience

It would be nice to have data class to work with AWS Config Rule event in the same manner, as we are working with SQS, SNS, etc.

Alternative solutions

No response

Acknowledgment

@ctacka ctacka added feature-request feature request triage Pending triage from maintainers labels Oct 28, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 28, 2022

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our AWS Lambda Powertools Discord: Invite link

@heitorlessa heitorlessa added need-customer-feedback Requires more customers feedback before making or revisiting a decision and removed triage Pending triage from maintainers labels Nov 14, 2022
@heitorlessa
Copy link
Contributor

heitorlessa commented Nov 14, 2022

@pcolazurdo you have tons of experience with Config - are there any known gotchas with events from Config? e.g., structure changes slightly when X is configured

@ctacka thank you for the feature request! Besides the data class, are there any repetitive task that we could make it easier as part of this new data class?

Added the correct labels to watch for +1 to help us prioritize.

Thank you!

@heitorlessa heitorlessa added good first issue Good for newcomers help wanted Could use a second pair of eyes/hands labels Nov 14, 2022
@pcolazurdo
Copy link

As mentioned by @ctacka there are tree types of Config Rules events: Evaluations Triggered by Configuration Changes, Evaluations Triggered by Oversized Configuration Changes and Evaluations Triggered by Periodic Frequency. The three events have a lot of common fields, and they are around 10 (as of today) in total.

Two of these fields encode most of the important information about the rule evaluation. They come encoded as JSON string and they don't have a well defined schema as they depend on the rule itself.

IMHO, the added value of these three new data classes will be limited. Considering the effort to maintain this feature over time, I would try to capture addition additional interest on this feature before adding it into the project.

As the AWS config Rule Development Kit (RDK) is the tool specifically designed to help create Config Rules, I would try to consider if that is not a better place to suggest improvements around the experience of Config Rules development.

@ran-isenberg
Copy link
Contributor

+1 for Parser support too. Once there's a dataclass example, the parser can be implemented easily

@gdenn
Copy link

gdenn commented Mar 8, 2023

@pcolazurdo @heitorlessa I am new to the community. Any chance I could work on this issue? I am familiar with the AWS Config basics but I would need some guidance for this.

@leandrodamascena
Copy link
Contributor

Hi @gdenn! How are you? Thank you for your interest in helping us create this new feature, we always love it when the community gets involved to contribute to this project. Sorry for the late reply, but March was a busy month and we are revisiting any issues to update and move forward.

Powertools is a project that aims to help customers adopt serverless quickly and following best practices, and one of the utilities we have to fulfill this mission is the "Event Source Data Class". This utility creates classes based on the services that can invoke the lambda (and there are many), these classes help to make the code cleaner and help the developer to access the objects/properties of that class more easily. Look at this example where a developer can use a specific event source class for S3 event. With just a few lines of code, the developer can access the properties of an S3 event that invokes Lambda.

To add a new EventSource Class you need to create a class and a test for that new class. You can check this PR where we added a class for KinesisFirehoseEvent.

I'm still not sure if we'll be adding this new EventSource in upcoming releases, but if so, are you still available to do this? We can work together and I can help you with some guidance.

Thank you so much.

@leandrodamascena leandrodamascena added event_sources Event Source Data Class utility and removed good first issue Good for newcomers help wanted Could use a second pair of eyes/hands need-customer-feedback Requires more customers feedback before making or revisiting a decision labels Apr 24, 2023
@leandrodamascena
Copy link
Contributor

Starting to add this feature.

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments 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.

@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label Jun 15, 2023
@github-actions
Copy link
Contributor

This is now released under 2.17.0 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event_sources Event Source Data Class utility feature-request feature request
Projects
None yet
6 participants