# Buggy code
def open_data_docs(self, resource_identifier=None):
    """
    A stdlib cross-platform way to open a file in a browser.

    :param resource_identifier: ExpectationSuiteIdentifier, ValidationResultIdentifier
            or any other type's identifier. The argument is optional - when
            not supplied, the method returns the URL of the index page.
    """
    data_docs_urls = self.get_docs_sites_urls(resource_identifier=resource_identifier)
    for site_dict in data_docs_urls:
        logger.debug("Opening Data Docs found here: {}".format(site_dict["site_url"]))
        webbrowser.open(site_dict["site_url"])


# Traceback (botocore.exceptions.ClientError)
Running great_expectations docs build --site-name local_site
Building Data Docs...
The following Data Docs sites were built:
- local_site: file:///great_expectations/uncommitted/data_docs/local_site/index.html
Traceback (most recent call last):
File "/usr/local/bin/great_expectations", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/great_expectations/cli/cli.py", line 67, in main
cli()
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/great_expectations/cli/docs.py", line 40, in docs_build
build_docs(context, site_name=site_name, view=view)
File "/usr/local/lib/python3.7/site-packages/great_expectations/cli/docs.py", line 147, in build_docs
context.open_data_docs()
File "/usr/local/lib/python3.7/site-packages/great_expectations/core/usage_statistics/usage_statistics.py", line 215, in usage_statistics_wrapped_method
result = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/great_expectations/data_context/data_context.py", line 428, in open_data_docs
data_docs_urls = self.get_docs_sites_urls(resource_identifier=resource_identifier)
File "/usr/local/lib/python3.7/site-packages/great_expectations/data_context/data_context.py", line 411, in get_docs_sites_urls
url = site_builder.get_resource_url(resource_identifier=resource_identifier)
File "/usr/local/lib/python3.7/site-packages/great_expectations/render/renderer/site_builder.py", line 253, in get_resource_url
return self.target_store.get_url_for_resource(resource_identifier=resource_identifier)
File "/usr/local/lib/python3.7/site-packages/great_expectations/data_context/store/html_site_store.py", line 168, in get_url_for_resource
return store_backend.get_url_for_key(key)
File "/usr/local/lib/python3.7/site-packages/great_expectations/data_context/store/tuple_store_backend.py", line 380, in get_url_for_key
location = boto3.client('s3').get_bucket_location(Bucket=self.bucket)['LocationConstraint']
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the GetBucketLocation operation: The AWS Access Key Id you provided does not exist in our records.

# Fixed code
def open_data_docs(
    self, resource_identifier: Optional[str] = None, site_name: Optional[str] = None
) -> None:
    """
    A stdlib cross-platform way to open a file in a browser.

    Args:
        resource_identifier: ExpectationSuiteIdentifier,
            ValidationResultIdentifier or any other type's identifier. The
            argument is optional - when not supplied, the method returns the
            URL of the index page.
        site_name: Optionally specify which site to open. If not specified,
            open all docs found in the project.
    """
    data_docs_urls = self.get_docs_sites_urls(
        resource_identifier=resource_identifier,
        site_name=site_name,
    )
    urls_to_open = [site["site_url"] for site in data_docs_urls]

    for url in urls_to_open:
        logger.debug(f"Opening Data Docs found here: {url}")
        webbrowser.open(url)