Menu
AWS OpsWorks
User Guide (API Version 2013-02-18)

Delete a Stack

If you no longer need a stack, you can delete it. Only empty stacks can be deleted; you must first delete all instances, apps, and layers in the stack.

To delete a stack

  1. On the AWS OpsWorks Stacks dashboard, choose the stack that you want to shut down and delete.

  2. In the navigation pane, choose Instances.

  3. On the Instances page, choose Stop all Instances.

  4. After the instances have stopped, for each instance in the layer, choose delete in the Actions column. When prompted to confirm, choose Yes, Delete.

  5. When all the instances are deleted, in the navigation pane, choose Layers.

  6. On the Layers page, for each layer in the stack, choose delete. On the confirmation prompt, choose Yes, Delete.

  7. When all layers are deleted, in the navigation pane, choose Apps.

  8. On the Apps page, for each app in the stack, choose delete in the Actions column. On the confirmation prompt, choose Yes, Delete.

  9. When all apps are deleted, in the navigation pane, choose Stack.

  10. On the stack page, choose Delete stack. On the confirmation prompt, choose Yes, Delete.

Deleting Other AWS Resources Used by a Stack

You use other AWS resources with AWS OpsWorks Stacks to create and manage your stacks. As you delete a stack, consider also deleting resources that worked with with the stack, if another stack is not using them, and resources outside AWS OpsWorks Stacks are not using them. The following are suggested reasons for cleaning up external AWS resources that you used with a stack.

  • External AWS resources can continue to accrue charges on your AWS account.

  • Resources such as Amazon S3 buckets can contain personally-identifying, sensitive, or confidential information.

Important

Do not delete these resources if they are in use by other stacks. Note that IAM roles and security groups are global, so stacks in other regions might be using these same resources.

The following are other AWS resources that stacks use, and links to information about how to delete them.

Service roles and instance profiles

When you create a stack, you specify an IAM role and an instance profile that AWS OpsWorks Stacks uses to create allowed resources on your behalf. AWS OpsWorks creates the role and instance profile for you if you do not choose existing ones. The role and instance profile that AWS OpsWorks creates for you are named aws-opsworks-service-role and aws-opsworks-ec2-role, respectively. If no other stacks in your account are using the IAM role and instance profile, it is safe to delete these resources. For information about how to delete IAM roles and instance profiles, see Deleting Roles or Instance Profiles in the IAM User Guide.

Security groups

In AWS OpsWorks Stacks, you can specify user-defined security groups at the layer level. You create security groups by using the IAM console or API. Stacks and layers in other regions can use the same security groups, because security groups are global. You can delete a security group if it's not in use by other AWS resources. For more information about how to delete a security group, see Deleting an IAM Group in the IAM User Guide.

Amazon EBS volumes

In AWS OpsWorks Stacks, you add EBS volumes at the layer level, and they are attached to instances in the layer. You create EBS volumes by using the Amazon EC2 service console or API, then attach them to AWS OpsWorks Stacks instances at the layer level. EBS volumes are specific to an availability zone. If you are no longer using an EBS volume in any stacks in a specific region and availability zone, you can delete the volume. For more information about how to delete an Amazon EBS volume, see Deleting an Amazon EBS Volume in the Amazon EC2 User Guide.

Amazon Simple Storage Service (Amazon S3) buckets

In AWS OpsWorks Stacks, you can use Amazon S3 buckets for the following. Content delivered to Amazon S3 buckets might contain customer content. For more information about removing sensitive data, see How Do I Empty an S3 Bucket? or How Do I Delete an S3 Bucket?.

  • Storing app code

  • Storing cookbooks and recipes

  • CloudTrail logs, if you have enabled CloudTrail logging in AWS OpsWorks Stacks

  • Amazon CloudWatch Logs streams, if you have enabled them in AWS OpsWorks Stacks

Elastic IP addresses

If you registered Elastic IP addresses with AWS OpsWorks Stacks, and you no longer need the Elastic IP addresses, you can release the Elastic IP address.

Elastic Load Balancing load balancers

If you no longer need an Elastic Load Balancing classic load balancer that you have been using with layers in your stack, you can delete it. For more information, see Delete Your Load Balancer in the User Guide for Classic Load Balancers.

Amazon Relational Database Service (Amazon RDS) instances

If you registered Amazon RDS database (DB) instances with AWS OpsWorks Stacks, and you no longer need them, you can delete DB instances. For more information about how to delete DB instances, see Deleting a DB Instance in the Amazon RDS User Guide.

Amazon Elastic Container Service (Amazon ECS) clusters

If your stack included ECS cluster layers, and you are no longer using the ECS cluster that was registered with a layer, you can delete the ECS cluster. For more information about how to delete an ECS cluster, see Deleting a Cluster in the Amazon ECS Developer Guide.