<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pablo Santamaria</title>
    <description>The latest articles on DEV Community by Pablo Santamaria (@4ndr4s).</description>
    <link>https://dev.to/4ndr4s</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F854010%2Fdf8fdffd-c5bc-4bdf-923a-99377dcd849e.png</url>
      <title>DEV Community: Pablo Santamaria</title>
      <link>https://dev.to/4ndr4s</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/4ndr4s"/>
    <language>en</language>
    <item>
      <title>Deshabilitar Security Hub controles en una organización en AWS</title>
      <dc:creator>Pablo Santamaria</dc:creator>
      <pubDate>Wed, 11 Oct 2023 22:29:03 +0000</pubDate>
      <link>https://dev.to/4ndr4s/deshabilitar-security-hub-controles-en-una-organizacion-en-aws-2og1</link>
      <guid>https://dev.to/4ndr4s/deshabilitar-security-hub-controles-en-una-organizacion-en-aws-2og1</guid>
      <description>&lt;h2&gt;
  
  
  Objetivo
&lt;/h2&gt;

&lt;p&gt;En este blog, exploraremos la automatización del proceso para habilitar o deshabilitar controles en &lt;a href="https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html" rel="noopener noreferrer"&gt;AWS Security Hub&lt;/a&gt; a través de una organización que comprende múltiples cuentas y regiones. A pesar de que Security Hub proporciona una funcionalidad de administración de controles, no existe una solución nativa que permita habilitar o deshabilitar controles de manera global.&lt;/p&gt;

&lt;p&gt;La solución descrita a continuación se encuentra basada en este &lt;a href="https://aws.amazon.com/blogs/security/disabling-security-hub-controls-in-a-multi-account-environment/" rel="noopener noreferrer"&gt;AWS blog&lt;/a&gt; adicionado las mejoras descritas a continuación:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Facilitar la habilitación o deshabilitación de controles a través de múltiples estándares, aprovechando una vista consolidada y empleando un ControlId común.&lt;/li&gt;
&lt;li&gt;Ofrecer flexibilidad para habilitar o deshabilitar controles de forma global o por regiones.&lt;/li&gt;
&lt;li&gt;Habilitar o deshabilitar controles en toda la organización sin necesidad de listar todas las cuentas de AWS.&lt;/li&gt;
&lt;li&gt;Tratar la cuenta administrativa de Security Hub como una cuenta miembro de la organización, garantizando una gestión unificada.&lt;/li&gt;
&lt;li&gt;Integración con s3 para ejecutar la State Machine cuando se detecta una actualización o adición de un elemento en la base de datos de DynamoDB.&lt;/li&gt;
&lt;li&gt;Uso de una tabla de DynamoDB que almacena información sobre regiones por cuenta de AWS, lo que resulta útil en organizaciones de gran envergadura con distintas necesidades de negocio que pueden involucrar habilitar diferentes regiones por cuenta.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Descripción
&lt;/h2&gt;

&lt;p&gt;Esta solución consiste en lo siguiente:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;cross-account IAM role&lt;/strong&gt; que se establece en todas las cuentas de la organización, otorgando los permisos necesarios para activar o desactivar controles a través de diversos estándares.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Step Function Machine&lt;/strong&gt; que asume el rol en las cuentas miembro de la organización, gestionando la habilitación o deshabilitación de controles y garantizando el cumplimiento según los estándares configurados en la cuenta administrativa.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;tabla DynamoDB&lt;/strong&gt; que almacena todas las excepciones, incluyendo los controles que deben ser activados o desactivados en cada cuenta o región de la organización.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;S3 Bucket&lt;/strong&gt; donde se carga el archivo &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt;, que contiene la lista de controles y su estado deseado.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;process_ddb_lambda Función Lambda&lt;/strong&gt; la cual se invoca cada vez que &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; se actualiza en el bucket de s3.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DynamoDB para cuentas y regions&lt;/strong&gt; Tabla de datos que almacena la relación de regiones habilitadas por cuenta de AWS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;StateMachineLambdaTrigger Función Lambda&lt;/strong&gt; encargada de iniciar la ejecución de la máquina de estado &lt;strong&gt;Step Function Machine&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel91uuqcy8xdh3qf70hh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel91uuqcy8xdh3qf70hh.png" alt="Diagrama"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuración
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Requisitos
&lt;/h3&gt;

&lt;p&gt;Para desplegar esta solución usted necesita:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;AWS CLI V2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html" rel="noopener noreferrer"&gt;AWS SAM CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cuentas miembro
&lt;/h3&gt;

&lt;p&gt;Despliegue cross-account IAM role definido en &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/member-iam-role/template.yaml" rel="noopener noreferrer"&gt;member-iam-role/template.yaml&lt;/a&gt; en todas las cuentas de la organización.&lt;/p&gt;

&lt;h4&gt;
  
  
  Despliegue
&lt;/h4&gt;

&lt;p&gt;Reemplace &lt;em&gt;my-stackset&lt;/em&gt; y &lt;em&gt;AccountID&lt;/em&gt; con el valor deseado y cree el stack-set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation create-stack-set \
--stack-set-name &amp;lt;my-stackset&amp;gt; \
--template-body file://member-iam-role/template.yaml \
--capabilities CAPABILITY_NAMED_IAM \
--call-as DELEGATED_ADMIN --permission-model SERVICE_MANAGED\ --auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false \
--parameters ParameterKey=SecurityHubAdminAccountId,ParameterValue=&amp;lt;AccountID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Parameters
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SecurityHubAdminAccountId&lt;/td&gt;
&lt;td&gt;Account ID of SecurityHub administrator Account&lt;/td&gt;
&lt;td&gt;&lt;em&gt;None&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAMRolePath&lt;/td&gt;
&lt;td&gt;Path for IAM Role - this must match the &lt;code&gt;MemberIAMRolePath&lt;/code&gt; parameter in the &lt;code&gt;UpdateMembers&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAMRoleName&lt;/td&gt;
&lt;td&gt;Name of IAM Role - this must match the &lt;code&gt;MemberIAMRoleName&lt;/code&gt; parameter in the &lt;code&gt;UpdateMembers&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;securityhub-UpdateControl-role&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Crear stack instances, reemplace &lt;em&gt;ORG-ID&lt;/em&gt; con el OU en el cual desea desplegar, si desea desplegar el role a nivel de la organización use el root ID de su organización.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation create-stack-instances --stack-set-name my-stackset \
--deployment-targets OrganizationalUnitIds='["ORG-ID"]' \
--regions '["us-east-1"]'  --call-as DELEGATED_ADMIN \
--operation-preferences FailureTolerancePercentage=100,MaxConcurrentCount=20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Security Hub Administrator Account
&lt;/h3&gt;

&lt;h4&gt;
  
  
  SAM
&lt;/h4&gt;

&lt;p&gt;Despliegue de la maquina de estado descrita en &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/CFN/template.yaml" rel="noopener noreferrer"&gt;CFN/template.yaml&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerrequisitos
&lt;/h4&gt;

&lt;p&gt;Debido a que template.yaml usa Serverless transformation, se require la creación de un artifact bucket en la cuenta administradora de Security Hub, el siguiente comando crea este bucket con el nombre &lt;em&gt;&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws s3 mb s3://&amp;lt;artifact-bucket&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Despliegue
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sam package --template-file CFN/template.yaml --output-template-file CFN/template-out.yaml --s3-bucket &amp;lt;artifact-bucket&amp;gt;
aws cloudformation deploy --template-file CFN/template-out.yaml --capabilities CAPABILITY_IAM --stack-name &amp;lt;stack-name&amp;gt; --parameter-overrides SecurityHubAdminAccountId=&amp;lt;AccountID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Parameters
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Schedule&lt;/td&gt;
&lt;td&gt;The scheduling expression that determines when and how often the Security Hub Disabler runs.&lt;/td&gt;
&lt;td&gt;rate(1 day)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MemberIAMRolePath&lt;/td&gt;
&lt;td&gt;Path of IAM Role in member account - this must match the &lt;code&gt;IAMRolePath&lt;/code&gt; parameter in the &lt;code&gt;memeber-iam-role&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MemberIAMRoleName&lt;/td&gt;
&lt;td&gt;Name of IAM Role in member account - this must match the &lt;code&gt;IAMRoleName&lt;/code&gt; parameter in the &lt;code&gt;memeber-iam-role&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;securityhub-UpdateControl-role&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path&lt;/td&gt;
&lt;td&gt;Path of IAM LambdaExecution Roles&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EventTriggerState&lt;/td&gt;
&lt;td&gt;The state of the SecurityHubUpdateEvent rule monitoring Security Hub control updates and triggering the state machine&lt;/td&gt;
&lt;td&gt;DISABLED&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NotificationEmail1&lt;/td&gt;
&lt;td&gt;Optional - E-mail address to receive notification if the state machine fails.&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NotificationEmail2&lt;/td&gt;
&lt;td&gt;Optional - E-mail address to receive notification if the state machine fails.&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NotificationEmail3&lt;/td&gt;
&lt;td&gt;Optional - E-mail address to receive notification if the state machine fails.&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Terraform
&lt;/h4&gt;

&lt;p&gt;Despliegue la solución descrita en el folder terraform la cual se encargara de crear el bucket de s3 y la función lambda que se encargara de actualizar la base de datos cuando se sube un nuevo archivo json con los controles a deshabilitar o habilitar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Inicie terraform
terraform init

## Ejecute el plan para evaluar cambios
terraform plan

## Ejecute apply
terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Uso
&lt;/h4&gt;

&lt;p&gt;Luego de desplegar esta solución, se ejecutara con base en los siguientes triggers:&lt;/p&gt;

&lt;p&gt;Ejecución programada.&lt;/p&gt;

&lt;p&gt;Este tipo de ejecución se inicia según un cronograma predefinido. Puede configurar el intervalo de tiempo utilizando el parámetro "Schedule," siendo un día el valor predeterminado. Puede hacer uso de las siguientes &lt;a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html" rel="noopener noreferrer"&gt;expresiones&lt;/a&gt; para personalizar el cronograma. &lt;/p&gt;

&lt;p&gt;Esta ejecución está diseñada para mantener la organización en cumplimiento de los estándares habilitados y para propagar estos estándares junto con el estado de los controles a las nuevas cuentas en toda la organización.&lt;/p&gt;

&lt;p&gt;Ejecución basada en eventos.&lt;/p&gt;

&lt;p&gt;Esta modalidad de ejecución se dispara cada vez que se habilita o deshabilita un control en la cuenta administradora de Security Hub. Es importante tener en cuenta una limitación: si se realizan numerosos cambios en los controles en un corto período de tiempo, este evento puede generar múltiples ejecuciones paralelas, lo que podría llevar a la saturación de la API. &lt;/p&gt;

&lt;p&gt;Para este proyecto en particular, hemos optado por mantener esta ejecución desactivada, ya que tenemos diversas necesidades de negocio que no requieren que el estado de los controles en la cuenta administradora se refleje en las cuentas miembro.&lt;/p&gt;

&lt;p&gt;Ejecución basada en eventos de S3&lt;/p&gt;

&lt;p&gt;Cada vez que se agrega o actualiza un nuevo archivo en el bucket de S3 después de actualizar las bases de datos, se inicia una ejecución de la &lt;em&gt;State Machine&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Configurando excepciones
&lt;/h4&gt;

&lt;p&gt;Para añadir elementos a la tabla de DynamoDB alojada en la cuenta administradora de Security Hub, cada elemento representará una excepción. Cada excepción contendrá, al menos, una cuenta de AWS. Cada vez que un archivo es añadido o actualizado en el bucket de S3, se desencadenará la ejecución de una función Lambda, la cual, a su vez, iniciará una ejecución de la &lt;em&gt;State Machine&lt;/em&gt;. Esto garantizará la actualización de la(s) cuenta(s) relacionada(s) con dicha excepción.&lt;/p&gt;

&lt;p&gt;Para agregar elementos se debe editar el archivo &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt;, como ejemplo puede ver el archivo &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json.template" rel="noopener noreferrer"&gt;items.json.template&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  {
    "ControlId": "CloudTrail.5",
    "Disabled": [ "ALL" ],
    "DisabledReason": "We are not monitoring CT at Organization level, Jira Ticket XXX-01"
  },
  {
    "ControlId": "CloudTrail.6",
    "Disabled": ["123456789012", "123456789089", "123456789076"],
    "DisabledReason": "We are not monitoring CT at Organization level, Jira Ticket XXX-02"
  },
  {
      "ControlId": "IAM.9",
      "Enabled": ["ALL"],
      "DisabledReason": "Global resource control, should be enabled only in us-east-1, Jira Ticket XXX-03",
      "Region": ["us-east-1"]
  }


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Para agregar una excepción a toda la organización incluyendo la cuenta administradora de Security Hub debe usar "ALL".&lt;/p&gt;

&lt;p&gt;Para deshabilitar un control global, debe usar "Enabled" y la región donde desea que este control este habilitado. por ejemplo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Deshabilitar IAM.9 en todas las regiones a excepción de us-east-1
  {
      "ControlId": "IAM.9",
      "Enabled": ["ALL"],
      "DisabledReason": "Global resource control, should be enabled only in us-east-1, Jira Ticket XXX-03",
      "Region": ["us-east-1"]
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Adicionando o actualizando cuentas&lt;/strong&gt;: para actualizar las cuentas o agregar una cuenta y sus regions se debe editar el archivo &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/accounts.json" rel="noopener noreferrer"&gt;accounts.json&lt;/a&gt;. Luego de que una cuenta es adicionada o sus regiones actualizadas, una función lambda es invocada para luego de actualizar las bases de datos iniciar una ejecución de la &lt;em&gt;State Machine&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
    {
      "AccountId": "123456789012",
      "Regions": [
        "ap-northeast-1",
        "ap-northeast-2",
        "ap-northeast-3",
        "ap-south-1",
        "ap-southeast-1",
        "ap-southeast-2",
        "ca-central-1",
        "eu-central-1",
        "eu-north-1",
        "eu-west-1",
        "eu-west-2",
        "eu-west-3",
        "sa-east-1",
        "us-east-2",
        "us-west-1",
        "us-west-2",
        "us-east-1"
      ]
    },
    {
      "AccountId": "123456789012",
      "Regions": [
        "us-east-2",
        "us-west-1",
        "us-west-2",
        "us-east-1"
      ]
    }
  ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Luego de agregar o actualizar un elemento en el archivo &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; para aplicar estos cambios debe ejecutar terraform plan y terraform apply.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Disable Security Hub controls in an AWS organization</title>
      <dc:creator>Pablo Santamaria</dc:creator>
      <pubDate>Wed, 11 Oct 2023 22:28:53 +0000</pubDate>
      <link>https://dev.to/4ndr4s/disable-security-hub-controls-in-an-aws-organization-284j</link>
      <guid>https://dev.to/4ndr4s/disable-security-hub-controls-in-an-aws-organization-284j</guid>
      <description>&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;In this blog, we will explore the process of enabling and disabling controls in &lt;a href="https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html" rel="noopener noreferrer"&gt;AWS Security Hub&lt;/a&gt; across multiple accounts within an organization, with a dedicated Security Hub administrator account. Although AWS Security Hub offers control management, there is no native method to globally disable specific controls for all Security Hub member accounts. To address this gap, this project aims to streamline the process by propagating the action of enabling or disabling security standards and their controls from the Security Hub administrator account to all member accounts. &lt;/p&gt;

&lt;p&gt;The solution presented in this blog builds upon an existing &lt;a href="https://aws.amazon.com/blogs/security/disabling-security-hub-controls-in-a-multi-account-environment/" rel="noopener noreferrer"&gt;AWS blog&lt;/a&gt; post, enhancing it with the following key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Common ControlID: We introduce the concept of enabling or disabling controls using a common ControlID across enabled standards, effectively resolving the &lt;a href="https://github.com/aws-samples/aws-security-hub-cross-account-controls-disabler/issues/10" rel="noopener noreferrer"&gt;issue&lt;/a&gt; of control management.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Global Controls: We address the challenge of enabling or disabling controls based on &lt;a href="https://github.com/aws-samples/aws-security-hub-cross-account-controls-disabler/issues/11" rel="noopener noreferrer"&gt;regions&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplified Account Management: Instead of manually listing all account IDs, we provide a mechanism to enable or disable controls across the organization effortlessly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security Hub Admin Account: We recognize the Security Hub Admin account as a member account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration with S3 and Lambda function: We implement S3 integration to initiate a State Machine execution whenever a new item is added to the DynamoDB table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AccountIds DynamoDB table: For large organizations with different business units is common to use different regions across the account within the organization, for this case we implement a DynamoDB to control regions per account.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The proposed solution encompasses the following components:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-Account IAM Role&lt;/strong&gt;: Member accounts are equipped with a cross-account IAM role, granting the necessary Security Hub permissions to enable/disable Security standard controls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Step Function State Machine&lt;/strong&gt;: This state machine assumes the cross-account IAM role and manages the enablement or disablement of controls in member accounts, ensuring alignment with the DynamoDB exceptions, ensuring the organization's compliance with the enabled standards in the Security Hub admin account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DynamoDB Table for Exceptions&lt;/strong&gt;: A DynamoDB table contains information about which controls should be enabled or disabled in specific accounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DynamoDB Table for Accounts-Region&lt;/strong&gt;: A DynamoDB table contains information about which regions are enable per account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;S3 Bucket&lt;/strong&gt;: An S3 bucket to upload of an &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; file containing exceptions to be added to the DynamoDB table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lambda Function&lt;/strong&gt;: This function is triggered when the &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; file is updated in the S3 bucket, ensuring real-time updates to control exceptions in the DynamoDB table and initiating Step Function Machine executions in response to DynamoDB updates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel91uuqcy8xdh3qf70hh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel91uuqcy8xdh3qf70hh.png" alt="Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;p&gt;To deploy this solution, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;AWS CLI V2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html" rel="noopener noreferrer"&gt;AWS SAM CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Member Accounts
&lt;/h3&gt;

&lt;p&gt;Deploy the cross-account IAM role defined in &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/member-iam-role/template.yaml" rel="noopener noreferrer"&gt;member-iam-role/template.yaml&lt;/a&gt; in all member accounts.&lt;br&gt;
For &lt;em&gt;SecurityHubAdminAccountId&lt;/em&gt;, set the Account ID of the Security Hub administrator account.&lt;/p&gt;
&lt;h4&gt;
  
  
  Deployment
&lt;/h4&gt;

&lt;p&gt;Replace &lt;em&gt;my-stackset&lt;/em&gt; and &lt;em&gt;AccountID&lt;/em&gt; with the desired value and create the stack-set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation create-stack-set \
--stack-set-name &amp;lt;my-stackset&amp;gt; \
--template-body file://member-iam-role/template.yaml \
--capabilities CAPABILITY_NAMED_IAM \
--call-as DELEGATED_ADMIN --permission-model SERVICE_MANAGED\ --auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false \
--parameters ParameterKey=SecurityHubAdminAccountId,ParameterValue=&amp;lt;AccountID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Parameters
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SecurityHubAdminAccountId&lt;/td&gt;
&lt;td&gt;Account ID of SecurityHub administrator Account&lt;/td&gt;
&lt;td&gt;&lt;em&gt;None&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAMRolePath&lt;/td&gt;
&lt;td&gt;Path for IAM Role - this must match the &lt;code&gt;MemberIAMRolePath&lt;/code&gt; parameter in the &lt;code&gt;UpdateMembers&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAMRoleName&lt;/td&gt;
&lt;td&gt;Name of IAM Role - this must match the &lt;code&gt;MemberIAMRoleName&lt;/code&gt; parameter in the &lt;code&gt;UpdateMembers&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;securityhub-UpdateControl-role&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Create the stack instances, replace the &lt;em&gt;ORG-ID&lt;/em&gt; with the desired OU-ID, if you want to deploy at organization level use your root OU-ID.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation create-stack-instances --stack-set-name my-stackset \
--deployment-targets OrganizationalUnitIds='["ORG-ID"]' \
--regions '["us-east-1"]'  --call-as DELEGATED_ADMIN \
--operation-preferences FailureTolerancePercentage=100,MaxConcurrentCount=20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Security Hub Administrator Account
&lt;/h3&gt;

&lt;h4&gt;
  
  
  SAM
&lt;/h4&gt;

&lt;p&gt;Deploy the state machine described in &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/CFN/template.yaml" rel="noopener noreferrer"&gt;CFN/template.yaml&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;Before proceeding with the &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/CFN/template.yaml" rel="noopener noreferrer"&gt;CFN/template.yaml&lt;/a&gt; file, which utilizes the Serverless transformation, it is essential to set up an artifact bucket within the Security Hub administrator account. To create this artifact bucket, you can use the following command, specifying your chosen name for the bucket as &lt;em&gt;&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws s3 mb s3://&amp;lt;artifact-bucket&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Deployment
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sam package --template-file CFN/template.yaml --output-template-file CFN/template-out.yaml --s3-bucket &amp;lt;artifact-bucket&amp;gt;
aws cloudformation deploy --template-file CFN/template-out.yaml --capabilities CAPABILITY_IAM --stack-name &amp;lt;stack-name&amp;gt; --parameter-overrides SecurityHubAdminAccountId=&amp;lt;AccountID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Parameters
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Schedule&lt;/td&gt;
&lt;td&gt;The scheduling expression that determines when and how often the Security Hub Disabler runs.&lt;/td&gt;
&lt;td&gt;rate(1 day)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MemberIAMRolePath&lt;/td&gt;
&lt;td&gt;Path of IAM Role in member account - this must match the &lt;code&gt;IAMRolePath&lt;/code&gt; parameter in the &lt;code&gt;memeber-iam-role&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MemberIAMRoleName&lt;/td&gt;
&lt;td&gt;Name of IAM Role in member account - this must match the &lt;code&gt;IAMRoleName&lt;/code&gt; parameter in the &lt;code&gt;memeber-iam-role&lt;/code&gt; stack.&lt;/td&gt;
&lt;td&gt;securityhub-UpdateControl-role&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path&lt;/td&gt;
&lt;td&gt;Path of IAM LambdaExecution Roles&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EventTriggerState&lt;/td&gt;
&lt;td&gt;The state of the SecurityHubUpdateEvent rule monitoring Security Hub control updates and triggering the state machine&lt;/td&gt;
&lt;td&gt;DISABLED&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SecurityHubAdminAccountId&lt;/td&gt;
&lt;td&gt;Account ID of SecurityHub administrator Account&lt;/td&gt;
&lt;td&gt;&lt;em&gt;None&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NotificationEmail1&lt;/td&gt;
&lt;td&gt;Optional - E-mail address to receive notification if the state machine fails.&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NotificationEmail2&lt;/td&gt;
&lt;td&gt;Optional - E-mail address to receive notification if the state machine fails.&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NotificationEmail3&lt;/td&gt;
&lt;td&gt;Optional - E-mail address to receive notification if the state machine fails.&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Terraform
&lt;/h4&gt;

&lt;p&gt;To deploy this solution, navigate to the terraform folder, where you will find the necessary configurations to set up the solution. This includes the creation of an S3 bucket and a Lambda function, which plays a pivotal role in updating the DynamoDB table each time a new JSON file containing control status information is uploaded to the S3 bucket.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## terraform initialization
terraform init

## Execute the plan to evaluate changes
terraform plan

## execute apply
terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Usage
&lt;/h4&gt;

&lt;p&gt;Once the deployment is complete, the solution operates automatically, driven by the following triggers:&lt;/p&gt;

&lt;h5&gt;
  
  
  Scheduled Trigger
&lt;/h5&gt;

&lt;p&gt;The Scheduled Trigger operates based on a predefined schedule, which can be customized using the Schedule parameter. By default, it runs daily. You have the flexibility to employ scheduling expressions as detailed in the AWS documentation &lt;a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
The Scheduled Trigger serves a dual purpose: it ensures that newly added accounts are promptly updated as Security Hub member accounts and propagates the status of controls that were previously disabled even before the solution deployment to all existing member accounts.&lt;/p&gt;
&lt;h5&gt;
  
  
  Event Trigger
&lt;/h5&gt;

&lt;p&gt;The Event Trigger activates each time a control is disabled or enabled in the Security Hub administrator account. The behavior of the Event Trigger can be controlled via the EventTriggerState parameter, which can be set during the deployment process.&lt;br&gt;
Limitation: If a lot of controls are changed in a very short timeframe (e.g. when done programmatically via Security Hub Controls CLI), the Event Trigger causes multiple parallel executions which may lead to API throttling and thus failure of the execution.&lt;/p&gt;

&lt;p&gt;For specific cases where reflecting the control status of the admin account in member accounts is unnecessary, we have chosen to disable this trigger.&lt;/p&gt;
&lt;h5&gt;
  
  
  S3 update events
&lt;/h5&gt;

&lt;p&gt;The state machine is triggered after a file is updated or a new item or added in the S3 Bucket.&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting exceptions
&lt;/h3&gt;

&lt;p&gt;Exceptions are managed through the DynamoDB table deployed in the SecurityHub administrator account. Each individual element within this table represents an exception. Every exception should include at least one AWS account associated with it.&lt;/p&gt;

&lt;p&gt;Here's how the process works:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding or Updating Exceptions&lt;/strong&gt;: Whenever a new exception is added or an existing one is updated, a Lambda function is invoked. This Lambda function, in turn, initiates the execution of a new State Machine.&lt;/p&gt;

&lt;p&gt;To add exceptions edit the json file &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt;, for guidance and reference, you may consult the &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json.template" rel="noopener noreferrer"&gt;items.json.template&lt;/a&gt; file.&lt;/p&gt;

&lt;p&gt;The following json object is an extraction of the &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  {
    "ControlId": "CloudTrail.5",
    "Disabled": [ "ALL" ],
    "DisabledReason": "We are not monitoring CT at Organization level, Jira Ticket XXX-01"
  },
  {
    "ControlId": "CloudTrail.6",
    "Disabled": ["123456789012", "123456789089", "123456789076"],
    "DisabledReason": "We are not monitoring CT at Organization level, Jira Ticket XXX-02"
  },
  {
      "ControlId": "IAM.9",
      "Enabled": ["ALL"],
      "DisabledReason": "Global resource control, should be enabled only in us-east-1, Jira Ticket XXX-03",
      "Region": ["us-east-1"]
  }


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Adding Organization-Wide Exceptions&lt;/strong&gt;: When adding an exception that applies to the entire organization, you can streamline the process by simply using the keyword "ALL". This eliminates the need to list individual accounts, making exception management more efficient and less error-prone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disabling Global Controls&lt;/strong&gt;: To disable a global control, the key step is to use the "Enabled" parameter while specifying the region within which this control should be enabled. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Disable IAM.9 in all regions but us-east-1
  {
      "ControlId": "IAM.9",
      "Enabled": ["ALL"],
      "DisabledReason": "Global resource control, should be enabled only in us-east-1, Jira Ticket XXX-03",
      "Region": ["us-east-1"]
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Implementing exceptions&lt;/strong&gt;: Once you've made updates to an element within the &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; file and wish to apply these alterations, follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Save your modifications within the &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/items.json" rel="noopener noreferrer"&gt;items.json&lt;/a&gt; file.&lt;/li&gt;
&lt;li&gt;execute below terraform commands:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Execute the plan to evaluate changes
terraform plan

## execute apply
terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Adding or Updating Accounts&lt;/strong&gt;: Whenever a new account is added or an existing one is updated, a Lambda function is invoked. This Lambda function, in turn, initiates the execution of a new State Machine, to update or add accounts and regions update &lt;a href="https://github.com/4ndr4s/AWS-SecHub-Cross-Account-Region-Controls-Disabler/blob/main/Terraform/lambda/accounts.json" rel="noopener noreferrer"&gt;accounts.json&lt;/a&gt; file as described below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
    {
      "AccountId": "123456789012",
      "Regions": [
        "ap-northeast-1",
        "ap-northeast-2",
        "ap-northeast-3",
        "ap-south-1",
        "ap-southeast-1",
        "ap-southeast-2",
        "ca-central-1",
        "eu-central-1",
        "eu-north-1",
        "eu-west-1",
        "eu-west-2",
        "eu-west-3",
        "sa-east-1",
        "us-east-2",
        "us-west-1",
        "us-west-2",
        "us-east-1"
      ]
    },
    {
      "AccountId": "123456789012",
      "Regions": [
        "us-east-2",
        "us-west-1",
        "us-west-2",
        "us-east-1"
      ]
    }
  ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After saving your changes run terraform plan and apply again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this blog, you learned how to disable some controls across multiple accounts within organization. we showed how the controls can quickly be disabled or enabled using the solution described. This project provide a solution to disable controls across different standards using a common controlID besides giving the option to disable controls for global resources. &lt;/p&gt;

&lt;p&gt;We also introduced a DynamoDb table to control regions per account, this additional feature is useful for large organizations with multiple business unit that requires different enabled regions per account.&lt;/p&gt;

&lt;p&gt;If you have feedback about this post, submit comments in the Comments section below. If you have trouble with the solution, please open an issue in GitHub.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
