CDK code refactoring - best practices regarding constructs vs simple classes #22016
-
Hi, This has the benefit of adding the parent id to the children ids/names. but also this can cause resources to change logical id when moved around (and thus recreated). On the other hand, I could use simple classes without inheriting Construct. this will have all the refactoring value, but without the logical id changes, but also without the naming hierarchy. Are there any other reasons to favor one over the other? Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is my take on the subject: |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
This is my take on the subject:
https://medium.com/cyberark-engineering/the-tale-of-aws-cdk-refactoring-logical-ids-and-lost-resources-fe9d91dfecd6