private static void addProviderToChain(final Function<Void, Void> func) {
        try {
            func.apply(null);
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
    }
Gets instance.

@param credentialAccessKey the credential access key
@param credentialSecretKey the credential secret key
@param profilePath         the profile path
@param profileName         the profile name
@return the instance
support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/ChainingAWSCredentialsProvider.java