docs: protected static String createIamRole(String s3Prefix) throws InterruptedException {
          try {
              //set trust policy for the role
              iamClient.createRole(new CreateRoleRequest()
                      .withRoleName(iamRoleName)
                      .withAssumeRolePolicyDocument(getTrustPolicy()));
          } catch (EntityAlreadyExistsException e) {
              LOG.info("IAM role with name " + iamRoleName + " already exists");
          } catch (MalformedPolicyDocumentException policyDocumentException){
  			LOG.error(String.format("Please check the trust policy document for malformation: %s",
  					IAM_ROLE_TRUST_POLICY_DOCUMENT));
              throw policyDocumentException;
          }
  
          // Update the role policy with permissions so that principal can access the resources
          // with necessary conditions
          putRolePolicy(s3Prefix);
  
          String roleARN = iamClient.getRole(new GetRoleRequest().withRoleName(iamRoleName)).getRole().getArn();
          // Sleep for 5 seconds because IAM role creation takes some time to propagate
          Thread.sleep(5000);
          return roleARN;
      }