

# Working with AWS CloudFormation by using the AWS Toolkit for JetBrains
<a name="cloudformation"></a>

The following topics describe how to use the AWS Toolkit for JetBrains to work with AWS CloudFormation stacks in an AWS account.

**Topics**
+ [Viewing event logs for a stack](cloudformation-logs.md)
+ [Deleting a stack](cloudformation-delete.md)

# Viewing event logs for an AWS CloudFormation stack by using the AWS Toolkit for JetBrains
<a name="cloudformation-logs"></a>

1. Open AWS Explorer, if it isn't already open. If the stack is in an AWS Region that's different from the current one, switch to a different AWS Region that contains it.

1. Expand **CloudFormation**.

1. To view event logs for the stack, right-click the stack's name. The AWS Toolkit for JetBrains displays the event logs in the **CloudFormation** tool window.

   To hide or show the **CloudFormation** tool window, on the main menu, choose **View**, **Tool Windows**, **CloudFormation**.  
![\[Choosing to view event logs for an AWS CloudFormation stack starting from AWS Explorer\]](http://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/images/cloudformation-logs.png)

# Deleting an AWS CloudFormation stack by using the AWS Toolkit for JetBrains
<a name="cloudformation-delete"></a>

1. Open AWS Explorer, if it isn't already open. If you need to switch to a different AWS Region that contains the stack, do that now.

1. Expand **CloudFormation**.

1. Right-click the name of the stack to delete, and then choose **Delete CloudFormation Stack**.  
![\[Choosing to delete a AWS CloudFormation stack starting from AWS Explorer\]](http://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/images/sam-delete.png)

1. Enter the stack's name to confirm it's deleted, and then choose **OK**. If the stack deletion succeeds, the AWS Toolkit for JetBrains removes the stack name from the **CloudFormation** list in **AWS Explorer**. If the stack deletion fails, you can troubleshoot by viewing the event logs for the stack.