Step 8: Clean up - Amazon CodeDeploy
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 8: Clean up

To avoid further charges for resources you used during this tutorial, you must terminate the Amazon EC2 instance and its associated resources. Optionally, you can delete the CodeDeploy deployment component records associated with this tutorial. If you were using a GitHub repository just for this tutorial, you can delete it now, too.

To delete a Amazon CloudFormation stack (if you used the Amazon CloudFormation template to create an Amazon EC2 instance)

  1. Sign in to the Amazon Web Services Management Console and open the Amazon CloudFormation console at https://console.amazonaws.cn/cloudformation.

  2. In the Stacks column, choose the stack starting with CodeDeploySampleStack.

  3. Choose Delete.

  4. When prompted, choose Delete stack. The Amazon EC2 instance and the associated IAM instance profile and service role are deleted.

To manually deregister and clean up an on-premises instance (if you provisioned an on-premises instance)

  1. Use the Amazon CLI to call the deregister command against the on-premises instance represented here by your-instance-name and the associated region by your-region:

    aws deploy deregister --instance-name your-instance-name --no-delete-iam-user --region your-region
  2. From the on-premises instance, call the uninstall command:

    aws deploy uninstall

To manually terminate an Amazon EC2 instance (if you manually launched an Amazon EC2 instance)

  1. Sign in to the Amazon Web Services Management Console and open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the navigation pane, under Instances, choose Instances.

  3. Select the box next to the Amazon EC2 instance you want to terminate. In the Actions menu, point to Instance State, and then choose Terminate.

  4. When prompted, choose Yes, Terminate.

To delete the CodeDeploy deployment component records

  1. Sign in to the Amazon Web Services Management Console and open the CodeDeploy console at https://console.amazonaws.cn/codedeploy.

    Note

    Sign in with the same user that you set up in Getting started with CodeDeploy.

  2. In the navigation pane, expand Deploy, then choose Applications.

  3. Choose CodeDeployGitHubDemo-App.

  4. Choose Delete application.

  5. When prompted, enter Delete, and then choose Delete.

To delete your GitHub repository

See Deleting a repository in GitHub help.