# Buggy code
def build_docs(context, site_name=None, view=True):
    """Build documentation in a context"""
    logger.debug("Starting cli.datasource.build_docs")

    cli_message("Building Data Docs...")

    if site_name is not None:
        site_names = [site_name]
    else:
        site_names = None

    index_page_locator_infos = context.build_data_docs(site_names=site_names)

    msg = "The following Data Docs sites were built:\n"
    for site_name, index_page_locator_info in index_page_locator_infos.items():
        if os.path.isfile(index_page_locator_info):
            msg += " - <cyan>{}:</cyan> ".format(site_name)
            msg += "file://{}\n".format(index_page_locator_info)
        else:
            msg += " - <cyan>{}:</cyan> ".format(site_name)
            msg += "{}\n".format(index_page_locator_info)

    msg = msg.rstrip("\n")
    cli_message(msg)

    if view:
        context.open_data_docs()


# 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 build_docs(context, site_name=None, view=True):
    """Build documentation in a context"""
    logger.debug("Starting cli.datasource.build_docs")

    cli_message("Building Data Docs...")

    if site_name is not None:
        site_names = [site_name]
    else:
        site_names = None

    index_page_locator_infos = context.build_data_docs(site_names=site_names)

    msg = "The following Data Docs sites were built:\n"
    for site_name, index_page_locator_info in index_page_locator_infos.items():
        if os.path.isfile(index_page_locator_info):
            msg += " - <cyan>{}:</cyan> ".format(site_name)
            msg += "file://{}\n".format(index_page_locator_info)
        else:
            msg += " - <cyan>{}:</cyan> ".format(site_name)
            msg += "{}\n".format(index_page_locator_info)

    msg = msg.rstrip("\n")
    cli_message(msg)

    if view:
        context.open_data_docs(site_name=site_name)