docs: protected static void putRolePolicy(String s3Prefix) {
          try {
              // set permissions policy for the role
              String permissionsPolicyDocument =
                      containsKMSKeyARN() ? getPermissionsPolicyWithKMSResources(s3Prefix)
                              : getPermissionsPolicyWithoutKMSResources();
              iamClient.putRolePolicy(new PutRolePolicyRequest()
                      .withRoleName(iamRoleName)
                      .withPolicyName(FIREHOSE_ROLE_POLICY_NAME)
                      .withPolicyDocument(permissionsPolicyDocument));
          } catch (MalformedPolicyDocumentException policyDocumentException){
              LOG.error(String.format("Please check the permissions policy document for malformation: %s",
                      containsKMSKeyARN() ? IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT
                              : IAM_ROLE_PERMISSIONS_POLICY_WITHOUT_KMS_RESOURCES_DOCUMENT));
              throw policyDocumentException;
          }
      }