private AWSCredentials resolveCredentials(PutMediaRequest request) {
        AWSCredentialsProvider resolvedProvider = CredentialUtils.getCredentialsProvider(request, credentialsProvider);
        AWSCredentials resolvedCredentials = resolvedProvider == null ? null : resolvedProvider.getCredentials();
        if (resolvedCredentials == null) {
            throw new SdkClientException(
                "Credentials must be provided via the builder or present in the environment. " +
                "See http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html");
        }
        return resolvedCredentials;
    }
Resolve credentials which may be overridden at a per request level.

@param request Request being made.
@return Credentials to use or null if no credentials found.
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/AmazonKinesisVideoPutMediaClient.java