iam_permissions_guardrails/constructs/service_control_policies/attachment_lambda/app.py [34:41]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        try:
            organizations_client.attach_policy(PolicyId=policy_id, TargetId=account)
        except organizations_client.exceptions.DuplicatePolicyAttachmentException:
            logger.info(f"Already attached  policy_id={policy_id} to {account}")
            pass
        except:
            logger.exception(f"Error attaching policy_id={policy_id} to {account}")
            raise
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



iam_permissions_guardrails/constructs/service_control_policies/attachment_lambda/app.py [121:128]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        try:
            organizations_client.attach_policy(PolicyId=policy_id, TargetId=account)
        except organizations_client.exceptions.DuplicatePolicyAttachmentException:
            logger.info(f"Already attached  policy_id={policy_id} to {account}")
            pass
        except:
            logger.exception(f"Error attaching policy_id={policy_id} to {account}")
            raise
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



