in src/org_setup/resources/organizations.py [0:0]
def enable_aws_service_access(self) -> None:
"""
Enable AWS service access in organization
"""
for principal in SERVICE_ACCESS_PRINCIPALS:
logger.info(f"[{self.region}] Enabling AWS service access for {principal}")
try:
self.client.enable_aws_service_access(ServicePrincipal=principal)
logger.debug(
f"[{self.region}] Enabled AWS service access for {principal}"
)
except botocore.exceptions.ClientError as error:
if error.response["Error"]["Code"] != "ServiceException":
logger.exception(
f"[{self.region}] Unable enable AWS service access for {principal}"
)
raise error