Triage and Remediation
Remediation
Using Console
Using Console
The misconfiguration “AWS Organizations Should Be Used” is related to the lack of proper organization and management of AWS accounts. This can lead to security and compliance risks, as well as increased costs and complexity. To remediate this misconfiguration, you can follow the below steps:
- Log in to the AWS Management Console and navigate to the AWS Organizations service.
- Click on the “Create organization” button to create a new organization.
- Follow the prompts to set up your organization, including creating a root account and adding member accounts.
- Once your organization is set up, you can use the AWS Organizations console to manage and govern your AWS accounts, including setting policies and controls to ensure compliance and security.
- You can also use AWS Organizations to simplify billing and cost management across your accounts, by consolidating billing and using cost allocation tags.
- Finally, make sure to regularly review and update your organization’s policies and controls to ensure they are up-to-date and effective in mitigating risks and maintaining compliance.
Using CLI
Using CLI
To remediate the misconfiguration “AWS Organizations should be used”, you can follow the below steps using AWS CLI:Note: Replace Note: Replace Note: Replace
- Create an AWS Organization by running the following command:
- Move all the AWS accounts under the organization by running the following command:
<account-id>
, <source-ou-id>
, and <destination-ou-id>
with the actual values.- Enable AWS Organizations service control policies (SCPs) by running the following command:
<root-id>
with the actual value.- Create and attach an SCP to the organization root to enforce the desired policies. For example, to restrict access to certain AWS services, you can create an SCP using the AWS Organizations console or AWS CLI and attach it to the organization root.
<policy-id>
and <root-id>
with the actual values.By following these steps, you can remediate the misconfiguration “AWS Organizations should be used” and ensure that all AWS accounts are managed centrally under an organization with appropriate policies enforced.Using Python
Using Python
The misconfiguration “AWS Organizations Should Be Used” suggests that AWS Organizations is not being used to manage multiple AWS accounts. AWS Organizations is a service that allows you to consolidate multiple AWS accounts into an organization that you create and centrally manage. By using AWS Organizations, you can automate account creation, apply policies across accounts, and simplify billing.To remediate this misconfiguration for AWS using Python, follow these steps:
- Install the AWS SDK for Python (Boto3) on your local machine.
- Create a new AWS account to act as the master account for your organization, if you don’t already have one.
- Create a new IAM user in the master account and give it the necessary permissions to create and manage AWS Organizations. You can do this using the AWS Management Console or the AWS CLI.
- Write a Python script that uses the Boto3 library to create a new AWS organization. Here’s an example script:
- Run the Python script to create the new organization. This will automatically create a root account for the organization and allow you to start adding member accounts.
- Use the AWS Management Console or the AWS CLI to add existing AWS accounts to your new organization as member accounts.
- Once all accounts are added, you can use AWS Organizations to apply policies across accounts, automate account creation, and simplify billing.