How To Remove An Account From AWS Organization

How To Remove An Account From AWS Organization

How To Remove An Account From AWS Organization

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In last couple of blogs, we had discussed how to create an organization, add members to the organization, create organizational unit and move accounts from one OU to another.

https://cloudaffaire.com/how-to-create-an-organization-in-aws/

https://cloudaffaire.com/how-to-create-an-organizational-unit-using-aws-cli/

In today’s blog post, we will do something destructive and cover below points –

  1. How to move an account from one child organizational unit to another child organizational unit.
  2. How to rename an organizational unit.
  3. How to delete an organizational unit.
  4. How to remove a member account from AWS organization
  5. How to delete an Organization in AWS

Warning: Deleting an organization is irreversible operation. This blog is for learning purpose only. Do not attempt to repro this without fully aware of the consequences.

If you are following this series, then you should have an organization structure similar to below.

How To Remove An Account From AWS Organization

Prerequisites:

  • Three active AWS account with admin access.
  • AWS organization created and two member accounts added.
  • AWS CLI installed and configured with admin access to each account.

I have already configured three AWS CLI profile for each account as below

You can use below link to install and configure AWS CLI.

https://cloudaffaire.com/how-to-install-aws-cli/

https://cloudaffaire.com/how-to-configure-aws-cli/

How To Move An Account From One Organizational Unit To Another Organizational Unit Using AWS CLI:

Here we will move the member2 account which is under regulatory OU to Foundation OU (refer the above diagram)

Step 1: Capture details for your Organization.

Step 2: Move Member2 account from Regulatory OU to Foundation OU

How To Rename An Organizational Unit Using AWS CLI:

Step 3: Rename an Organizational Unit in AWS using AWS CLI

How To Delete An Organizational Unit Using AWS CLI:

Step 4: Delete Standalone OU

How to remove a member account from AWS organization:

A member account can be removed from AWS Organization in two ways –

  1. You can remove the member account from management account directly
  2. Or you can raise a leave request from member account to management account

We will cover both 😊

Step 5: Remove a member account from AWS Organization

How To Delete An Organization In AWS Using AWS CLI:

Step 6: Delete an AWS Organization

Hope you have enjoyed this article. To know more about AWS organization, please refer below official documentation

https://docs.aws.amazon.com/organizations/index.html

Leave a Reply

Close Menu