
"Whether they need to better organize their code, adhere to coding best practices, or take advantage of object-oriented programming patterns like class inheritance, these changes can be risky in environments with deployed resources, because they change the CDK-generated logical ID of those resources. During a CDK deploy, AWS CloudFormation interprets these changes as new resources, which often requires deletion of the existing resource and creation"
"Today, developers can use the new CDK refactor command to detect, review, confirm, and safely apply refactored changes to their resources without resource replacement. This feature leverages the recently-launched AWS CloudFormation refactor feature, but the CDK automatically computes the mappings that CloudFormation needs to redefine the refactored resources, providing a layer of abstraction that allows developers to focus on code rather than resource configuration."
CDK Refactor preserves existing AWS resources when renaming constructs, moving resources between stacks, or reorganizing CDK applications by preventing logical ID changes from causing resource replacement. Renaming constructs or relocating resources changes CDK-generated logical IDs, which CloudFormation treats as new resources and can delete and recreate existing ones, risking downtime and data loss for stateful resources. Previously, developers had to stage changes, perform migrations, and delete old resources or avoid refactors. The new cdk refactor command detects, reviews, confirms, and applies mappings so CloudFormation reassigns logical IDs without replacement. The CDK computes mappings automatically, reducing manual configuration.
Read at Amazon Web Services
Unable to calculate read time
Collection
[
|
...
]