How To Manage AWS Organization Using API

How To Manage AWS Organization Using API

How To Manage AWS Organization Using API

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In Today’s blog post, we will discuss how to manage AWS Organization using API. We will use AWS CLI to make those API call but the concept remains the same if you are using any other SDK. Below is the target landscape that we are going to create using API (AWS CLI).

How To Manage AWS Organization Using API

If you want to know more about AWS organization, follow below link

https://cloudaffaire.com/what-is-aws-organization/

Prerequisites:

  • Three active AWS account with admin access.
  • AWS CLI and jq 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/

Step 1: Create A New AWS Organization using AWS CLI.

Step 2: Validate your management account email id (if not validated already).

Login to your email id associated with your management account and click on the link to validate your email id.

How To Manage AWS Organization Using API

Step 3: Invite members account to join AWS organization using email id

Step 4: In members account, accept the invite to join AWS organization

Step 4: Create new Organizational Unit (OU) using AWS CLI

Step 5: Move member accounts to specific OU (refer landscape diagram)

Step 6: Enable organization policy

Step 7: Create a new organization policy

Step 8: Attach the policy to “Regulatory” OU

Step 9: Get details of your organization

Step 10: Cleanup

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