Skip to content

Feature request: Add CloudFormation CustomResource events to EventSource dataclasses #4332

Closed

Description

@phipag

Use case

I am building a Lambda handler for managing CDK CustomResources (https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html).

Solution/User Experience

As a user of AWS Lambda Powertools I would like to have dataclass parsing and type-safety for all standard Lambda events coming from an AWS service. CloudFormation custom resources are missing.

Alternative solutions

No response

Acknowledgment

Activity

  1. added
    feature-request
    triage
    on May 15, 2024
  2. boring-cyborg commented on May 15, 2024

    @boring-cyborg

    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 Powertools for AWS Lambda Discord: Invite link

  3. leandrodamascena commented on May 15, 2024

    @leandrodamascena
    Contributor

    Hello @phipag! Thank you for opening this issue. We already support this in Parser and we really need to add support for this in our EventSource data class. Would you like to submit a PR to implement this? We can work together to merge it and include it in the release - scheduled for 17/05.

  4. moved this from Triage to Pending customer in Powertools for AWS Lambda (Python)on May 15, 2024
  5. added
    event_sources
    and removed
    triage
    on May 15, 2024
  6. phipag commented on May 15, 2024

    @phipag
    ContributorAuthor

    Hi @leandrodamascena, yes, I'm happy to contribute this feature. What are the next steps here?

  7. leandrodamascena commented on May 15, 2024

    @leandrodamascena
    Contributor

    Hello @phipag! That's amazing to hear! Check out the steps below and let me know if you need additional help.

    We use Poetry as the package manager and we have a Makefile to make things easier. So basically you need to fork the repository, create a new branch from your fork and type make dev to create your development environment. After that, you can do the following steps:

    1 - You need to create a new file called cloudformation_custom_resource_event.py - Use this class as an example: develop/aws_lambda_powertools/utilities/data_classes/vpc_lattice.py

    2 - You need to export this new class here - develop/aws_lambda_powertools/utilities/data_classes/init.py

    3 - You need to create a file with a fake payload here - develop/tests/events

    4 - You need to write a new test for this new class - Use this test as an example - develop/tests/unit/data_classes/test_vpc_lattice_event.py

    5 - You need to add this new class to the documentation - develop/docs/utilities/data_classes.md

    6 - Run the tests by typing make test and after that use make pr to make sure that everything is right.

    7 - If everything is right, just open the PullRequest and have a cold drink 🍹

  8. moved this from Pending customer to Backlog in Powertools for AWS Lambda (Python)on May 15, 2024
  9. phipag commented on May 15, 2024

    @phipag
    ContributorAuthor

    Cool. Thanks for detailed steps. That all makes sense to me. I'll reach out if something comes up on the way.

  10. phipag commented on May 16, 2024

    @phipag
    ContributorAuthor

    @leandrodamascena I submitted above PR for this.

  11. github-actions commented on May 23, 2024

    @github-actions
    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.

  12. added
    pending-release
    on Jun 10, 2024
  13. github-actions commented on Jun 13, 2024

    @github-actions
    Contributor

    This is now released under 2.39.0 version!

  14. removed
    pending-release
    on Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

event_sourcesfeature-request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions