Step 5: Delete MyStack - AWS OpsWorks

Step 5: Delete MyStack

Important

AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.

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.

    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.

    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.

    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.

  5. Delete MyStack

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

You have now reached the end of this walkthrough.