Step 5: Delete MyStack - AWS OpsWorks

Step 5: Delete MyStack

Important

The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers. We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post or through AWS Premium Support.

As soon as you begin using AWS resources like Amazon EC2 instances you are charged based on your usage. If you are finished for now, you should stop the instances so that you do not incur any unwanted charges. If you don’t need the stack anymore, you can delete it.

To delete MyStack
  1. Stop all Instances

    On the Instances page, click Stop All Instances and click Stop when asked confirm the operation.

    Confirmation dialog asking if user wants to stop the stack, warning about data loss.

    After you click Stop, AWS OpsWorks Stacks terminates the associated Amazon EC2 instances, but not any associated resources such as Elastic IP addresses or Amazon EBS volumes.

  2. Delete all Instances

    Stopping the instance just terminates the associated Amazon EC2 instances. After the instances status is in the stopped stated, you must delete each instance. In the PHP App Server layer click delete in the php-app1 instance's Actions column.

    PHP App Server table showing two instances with status, size, and actions including delete option.

    AWS OpsWorks Stacks then asks you to confirm the deletion, and shows you any dependent resources. You can choose to keep any or all of these resources. This example has no dependent resources, so just click Delete.

    Repeat the process for php-app2 and the MySQL instance, db-master1. Notice that db-master1 has an associated Amazon Elastic Block Store volume, which is selected by default. Leave it selected to delete the volume along with the instance.

  3. Delete the Layers.

    On the Layers page, click Delete and then click Delete to confirm.

    PHP App Server layer with options for General Settings, Recipes, Network, EBS Volumes, and Security.

    Repeat the process for the MySQL layer.

  4. Delete the App

    On the Apps page, click delete in the SimplePHPApp app's Actions column, and then click Delete to confirm.

    Confirmation dialog for deleting SimplePHPApp, warning of configuration loss.
  5. Delete MyStack

    On the Stack page, click Delete Stack and then click Delete to confirm.

    Confirmation dialog for deleting MyStack, warning of settings loss with Cancel and Delete options.

You have now reached the end of this walkthrough.