PR #182 (skip installation if specified version is installed) only satisfies the use case where the version number supplied is not 'latest' (i.e. the default value for 'version' when calling the install command).
If a version is not supplied (and so defaults to 'latest') then the following code will not match and an uninstall and reinstall will occur:
elif aws --version | grep "${AWS_CLI_STR_AWS_CLI_VERSION}"; then
In this case, it is necessary to identify the latest version available and then compare the result to the version installed.
N.B. For Windows, you can't assume that the latest version reported here is also the latest version available at Chocolatey.org (as there is usually a time lag for the site to be updated with the new version!)