Conversation
rix0rrr
reviewed
Apr 21, 2026
Contributor
|
The build is failing, and needs AppSec involvement because of the bootstrap stack change. Other than that I am good with this! |
cdk orphan command detaches resources from a stack, allowing resource type upgrades
auto-merge was automatically disabled
April 21, 2026 10:43
Head branch was pushed to by a user without write access
923a112 to
1ad0186
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1399 +/- ##
==========================================
- Coverage 88.13% 87.98% -0.15%
==========================================
Files 74 74
Lines 10481 10535 +54
Branches 1433 1433
==========================================
+ Hits 9237 9269 +32
- Misses 1217 1239 +22
Partials 27 27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mrgrain
requested changes
Apr 21, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
|
approved in principle. we need the additional PR #1403 merged first. |
mrgrain
approved these changes
Apr 24, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ws#1414) The `bin` field in the generated `package.json` serves no purpose for CDK apps and can cause issues. When the project directory is named `cdk`, running `tsc` emits `bin/cdk.js`, which `npx cdk` can then resolve instead of the AWS CDK CLI. Removes the `bin` field from all four app/sample-app init templates (TypeScript and JavaScript). Closes aws#1202 --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license Co-authored-by: keyboardDrummer-bot <keyboardDrummer-bot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: #1324
Adds a new
cdk orphancommand (behind--unstable=orphan) that safely detaches resources from a CloudFormation stack without deleting them. This enables resource type migrations (e.g., DynamoDBTable→TableV2) with zero downtime or data loss.Usage
How it works
The command performs three sequential CloudFormation deployments:
{Ref},{Fn::GetAtt}, and{Fn::Sub}values for the targeted resources viaDescribeStacksDeletionPolicy: Retain, replaces all cross-resource references with resolved literal values, and removesDependsOnentriesAfter orphaning, the command outputs a
cdk import --resource-mapping-inlinecommand with the resource mapping, so users can immediately re-import the resource under a new construct type.Changes
New:
cdk orphancommandpackages/@aws-cdk/toolkit-lib/lib/api/orphan/— CoreResourceOrphanerclass and reference resolution helperspackages/aws-cdk/lib/cli/— CLI wiring: command definition, argument parsing, user input typespackages/aws-cdk/README.md— Documentation with usage examples and a DynamoDB migration walkthroughEnhanced:
cdk importinline resource mappingpackages/@aws-cdk/toolkit-lib/lib/api/resource-import/importer.ts— AddedloadResourceIdentifiers()accepting a JSON string or object (in addition to the existing file-basedloadResourceIdentifiersFromFile())Tests
packages/@aws-cdk/toolkit-lib/test/api/orphan/orphan.test.ts— Unit tests for the orphaner (394 lines)packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/orphan/— Integration test: deploys a DynamoDB table + Lambda consumer, orphans the table, verifies template changes and data integrityDepends-On: #1403
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license