Due to the byte limit of SCPs (5120 bytes (not characters)) we should add an optional flag to remove all whitespaces in the JSON policies. Important note from the docs:
Note: If you save the policy by using the AWS Management Console, extra white space (such as spaces and line breaks) between JSON elements and outside of quotation marks, is removed and not counted. If you save the policy using an SDK operation or the AWS CLI, then the policy is saved exactly as you provided and no automatic removal of characters occurs.
Due to the byte limit of SCPs (5120 bytes (not characters)) we should add an optional flag to remove all whitespaces in the JSON policies. Important note from the docs: