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;
        }
    }
Method to put the role policy with permissions document. Permission document would change
based on KMS Key ARN specified in properties file. If KMS Key ARN is specified, permissions
document will contain KMS resource.

@param s3Prefix the s3Prefix which will be included in KMS Condition (only if KMS Key is provided)
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java