View a markdown version of this page

Use DeleteStack with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DeleteStack with a CLI

The following code examples show how to use DeleteStack.

Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code examples:

CLI
AWS CLI

To delete a stack

The following delete-stack example deletes the specified stack.

aws cloudformation delete-stack \ --stack-name my-stack

This command produces no output.

  • For API details, see DeleteStack in AWS CLI Command Reference.

PowerShell
Tools for PowerShell V4

Example 1: Deletes the specified stack.

Remove-CFNStack -StackName "myStack"
  • For API details, see DeleteStack in AWS Tools for PowerShell Cmdlet Reference (V4).

Tools for PowerShell V5

Example 1: Deletes the specified stack.

Remove-CFNStack -StackName "myStack"
  • For API details, see DeleteStack in AWS Tools for PowerShell Cmdlet Reference (V5).