Skip to main content

Aws Stackset Lifecycle

@jentz/aws-stackset-lifecyclev2026.06.22.0· 4d agoMODELS
01README

Write-side retirement operations for a CloudFormation StackSet, run from the management / delegated-admin account. Two MUTATING methods, each a single locked execution that writes one result resource (deleteInstances polls its operation to a terminal state; deleteStackSet is a direct delete).

deleteInstances runs DeleteStackInstances for an explicit batch of deployment targets (OUs + accounts) and regions, with an explicit retainStacks flag — use it batch-by-batch so each member is only briefly affected. A safety guard refuses to operate on a whole OU/root unless confirmWholeTarget: true is set, so a fat-fingered fleet-wide delete is impossible. deleteStackSet runs DeleteStackSet once the stackset is empty.

The official @swamp/aws/cloudformation/stack-set (Cloud Control) type deletes every instance at once with no batching and no RetainStacks control, so it cannot express a staged, low-blast-radius retirement. This model fills that gap using the native CloudFormation StackSets API, as the mutating sibling to the read-only @jentz/aws-stackset-audit and @jentz/aws-stackset-drift-detect.

MUTATING: needs cloudformation:DeleteStackInstances / cloudformation:DeleteStackSet plus the stackset admin role — a *-readonly profile cannot run these, by design.

02Models1
@jentz/aws-stackset-lifecyclev2026.06.22.0aws_stackset_lifecycle.ts

Global Arguments

ArgumentTypeDescription
stackSetNamestringThe name of the CloudFormation StackSet to operate on (e.g. 'ExampleOrgBaseline').
callAsenumWho you are calling as. SELF from the org management account;
regionstringRegion of the CloudFormation endpoint (the stackset admin region — where
profilestringNamed AWS profile to use (resolved via fromIni). Empty (default) uses the
fn deleteInstances(regions: array, retainStacks: boolean, confirmWholeTarget: boolean, pollSeconds: number, maxPolls: number)
MUTATING. DeleteStackInstances for an explicit batch of deployment
ArgumentTypeDescription
regionsarrayInstance regions to delete in this account set. List every region this
retainStacksbooleanREQUIRED by the API. false = delete the member stacks AND their resources.
confirmWholeTargetbooleanSafety guard. Must be true to delete instances for a whole OU/root with no
pollSecondsnumberSeconds between operation status polls.
maxPollsnumberMaximum status polls before timing out.
fn deleteStackSet()
MUTATING. DeleteStackSet for the configured stackset (it must already

Resources

result(infinite)— Outcome of one lifecycle operation: action, operation id, terminal
03Previous Versions1
2026.06.17.1Jun 18, 2026
04Stats
A
100 / 100
Downloads
0
Archive size
282.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels