
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
CLI and TypeScript SDK for managing AWS CloudFormation stacks with simple YAML parameters and real-time event streaming.
Deploy CloudFormation stacks without the usual suffering.
If you've deployed CloudFormation stacks, you know the pain:
aws cloudformation create-stack and get... nothing. Is it working? Who knows.ROLLBACK_COMPLETE. Now you have to delete it manually before you can try again.awscfn fixes this.
ROLLBACK_COMPLETE? awscfn detects it and re-creates the stack for you.It's not a CDK. It's not a framework. It's just a better way to deploy raw CloudFormation.
Global install (recommended for CLI use):
npm i -g awscfn
Then run commands directly: awscfn create-stack ...
Project dependency (for SDK/library use):
npm i awscfn
npx (no install):
npx awscfn create-stack ...
⚠️ Requires AWS credentials to be configured in your shell or environment. Start here if you haven't already.
| Flag | Description |
|---|---|
--ci, -C | CI mode (compact output). Auto-detected when CI=true or GITHUB_ACTIONS=true. |
--no-color, -N | Disable colored output |
--verbose, -V | Show full error details on failure |
--help, -h | Show help |
--version, -v | Show version |
Run awscfn --help or awscfn <command> --help for full CLI usage.
source <(awscfn completion)
Add to your shell config (e.g. ~/.zshrc) for command and file-path completion.
During stack operations, awscfn streams CloudFormation stack events in real-time (resource create/update/delete progress):
→ Updating stack my-stack
● Creating changeset (update)
… Waiting for changeset to be ready...
● Executing changeset...
● SomeResource / MyResource — update in progress
✓ SomeResource / MyResource — update complete
✓ Stack reached update complete (45s)
✓ Stack my-stack updated successfully
When a failure occurs, the error message includes the actual reason from CloudFormation events.
List all CloudFormation stacks in the current region (name, status, creation date).
awscfn list-stacks
awscfn create-stack -n <STACK_NAME> -t <TEMPLATE_FILE> -p <PARAMS_FILE>
| Flag | Description |
|---|---|
--name, -n | Stack name |
--template, -t | CloudFormation template file |
--params, -p | Parameters file (YAML) |
awscfn update-stack -n <STACK_NAME> -t <TEMPLATE_FILE> -p <PARAMS_FILE>
| Flag | Description |
|---|---|
--name, -n | Stack name |
--template, -t | CloudFormation template file |
--params, -p | Parameters file (YAML) |
If there are no changes to apply, the command succeeds gracefully:
✓ Stack my-stack is up to date (no changes)
awscfn redeploy-stack -n <STACK_NAME> -t <TEMPLATE_FILE>
| Flag | Description |
|---|---|
--name, -n | Stack name |
--template, -t | CloudFormation template file |
Redeploys using the existing stack's parameters. Useful for updating a stack with a new template without re-specifying params, or re-deploying after a failed create.
Deletes a CloudFormation stack with a confirmation safeguard.
awscfn delete-stack -n <STACK_NAME> -c <STACK_NAME>
| Flag | Description |
|---|---|
--name, -n | Stack name |
--confirm, -c | Repeat stack name to confirm |
--confirm must match --name exactly to prevent accidental deletion.
Example:
awscfn delete-stack -n my-app-prod -c my-app-prod
If the stack doesn't exist, the command will exit with an error.
If the names don't match, the deletion will be aborted.
⚠️ This is a destructive operation and cannot be undone.
⚠️ Requires AWS credentials to be configured in your shell or environment. Start here if you haven't already.
listStacks(): Promise<StackSummary[]>Returns all CloudFormation stacks in the current region (paginated). Excludes deleted stacks (DELETE_COMPLETE, DELETE_IN_PROGRESS) via StackStatusFilter. Each item is an AWS SDK StackSummary (e.g. StackName, StackStatus, CreationTime).
import { listStacks } from 'awscfn';
const stacks = await listStacks();
for (const s of stacks) {
console.log(s.StackName, s.StackStatus);
}
createStack(stackName: string, template: Template<P>): Promise<Stack>Creates a new CloudFormation stack using a change set and waits for it to complete or fail.
import { createStack } from 'awscfn';
import type { Template } from 'awscfn/sdk';
const template: Template<{ Env: string; AppName: string }> = {
body: myTemplateString,
params: {
Env: 'prod',
AppName: 'my-app',
},
};
await createStack('my-stack', template);
stackName: The name of the CloudFormation stack.template: A Template<P>, where P is the shape of the parameters.
body: string (CloudFormation template)params: a plain object of parameters matching your template.CREATE_COMPLETE, or an error).Stack from the AWS SDK.Throws a StackCreateFailure if:
ROLLBACK_COMPLETE)The error includes useful context:
{
stackName: string;
stackId?: string;
status?: StackStatus;
params?: TemplateParams;
sdkError?: Error;
failureReason?: string; // The actual error from CloudFormation events
}
The error message itself includes the failure reason when available:
💥 Failed to create stack my-stack
Reason: CannotPullContainerError: repository does not exist
updateStack(existingStack: Stack, template: Template<P>): Promise<Stack>Updates a CloudFormation stack using a change set and waits for it to complete.
import {updateStack, getStackByName} from 'awscfn';
const existing = await getStackByName('my-stack');
if (existing) {
await updateStack(existing, {
body: myTemplateString,
params: {
Env: 'prod',
AppName: 'my-app',
},
});
}
existingStack: A Stack object returned from AWS (e.g. from describeStacks). The stack must already exist and be in a terminal state.template: A Template<P> object — either:
{ body: string, params: P }ROLLBACK_COMPLETE, it:
createStack)✓ Stack my-stack is up to date (no changes)Stack objectIf the update fails, a StackUpdateFailure is thrown with helpful context:
{
stackName: string;
originalStack: Stack;
terminalStack: Stack;
status?: StackStatus;
sdkError?: Error;
failureReason?: string; // The actual error from CloudFormation events
}
The error message itself includes the failure reason when available:
💥 Failed to update stack my-stack
Reason: Resource handler returned message: "CannotPullContainerError: image not found"
ℹ️ Requires AWS credentials in your environment (
AWS_PROFILE,AWS_ACCESS_KEY_ID, etc.).
✅ This function ensures safety by skipping updates for in-progress stacks and gracefully recovering from
ROLLBACK_COMPLETEstates.
main — all tests must passMIT
FAQs
CLI and TypeScript SDK for managing AWS CloudFormation stacks with simple YAML parameters and real-time event streaming.
We found that awscfn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.