Menu
AWS CodeDeploy
User Guide (API Version 2014-10-06)

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 AWS 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 AWS CloudFormation stack (if you used the AWS CloudFormation template to create an Amazon EC2 instance)

  1. Sign in to the AWS Management Console and open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/.

  2. In the Stack Name column, select the box next to the stack starting with CodeDeploySampleStack.

  3. Choose Delete Stack.

  4. When prompted, choose Yes, Delete. The Amazon EC2 instance and the associated IAM instance profile and service role will be deleted.

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

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

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

    Copy
    aws deploy uninstall

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

  1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://console.aws.amazon.com/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 AWS CodeDeploy deployment component records

  1. Sign in to the AWS Management Console and open the AWS CodeDeploy console at https://console.aws.amazon.com/codedeploy.

    Note

    Sign in with the same account or IAM user information you used in Getting Started.

  2. If the Applications page is not displayed, on the AWS CodeDeploy menu, choose Applications.

  3. Choose CodeDeployGitHubDemo-App.

  4. On the Application details page, in Deployment groups, choose the button next to the deployment group. On the Actions menu, choose Delete. When prompted, type the name of the deployment group to confirm you want to delete it, and then choose Delete.

  5. At the bottom of the Application details page, choose Delete application.

  6. When prompted, type the name of the application to confirm you want to delete it, and then choose Delete.

To delete your GitHub repository

See Deleting a repository in GitHub Help.