Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lakeview requires specifying a region #9

Open
johnnyaug opened this issue Jun 28, 2022 · 1 comment
Open

lakeview requires specifying a region #9

johnnyaug opened this issue Jun 28, 2022 · 1 comment

Comments

@johnnyaug
Copy link
Contributor

johnnyaug commented Jun 28, 2022

Encountered by a community memeber on Slack.
Running the lakeview docker run command results in the following error:

Traceback (most recent call last):
  File "server.py", line 66, in <module>
    cli()
  File "/home/lakeview/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/lakeview/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/lakeview/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/lakeview/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "server.py", line 53, in cli
    app = create_flask_app(database, table, output_location)
  File "server.py", line 24, in create_flask_app
    db = loader.Inventory(athena_database=database, athena_table=table_name, output_location=output_location)
  File "/home/lakeview/app/loader.py", line 48, in __init__
    self.athena = boto3.client('athena')
  File "/home/lakeview/.local/lib/python3.8/site-packages/boto3/__init__.py", line 91, in client
    return _get_default_session().client(*args, **kwargs)
  File "/home/lakeview/.local/lib/python3.8/site-packages/boto3/session.py", line 258, in client
    return self._session.create_client(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/session.py", line 834, in create_client
    client = client_creator.create_client(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/client.py", line 85, in create_client
    client_args = self._get_client_args(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/client.py", line 326, in _get_client_args
    return args_creator.get_client_args(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/args.py", line 71, in get_client_args
    final_args = self.compute_client_args(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/args.py", line 147, in compute_client_args
    endpoint_config = self._compute_endpoint_config(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/args.py", line 218, in _compute_endpoint_config
    return self._resolve_endpoint(**resolve_endpoint_kwargs)
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/args.py", line 300, in _resolve_endpoint
    return endpoint_bridge.resolve(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/client.py", line 401, in resolve
    resolved = self.endpoint_resolver.construct_endpoint(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/regions.py", line 133, in construct_endpoint
    result = self._endpoint_for_partition(
  File "/home/lakeview/.local/lib/python3.8/site-packages/botocore/regions.py", line 148, in _endpoint_for_partition
    raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.

Either add code to discover the region of the bucket, or document (in the README and blog post) how to overcome this (for example, by adding the AWS_DEFAULT_REGION environment variable to the command).

@anthonymobile
Copy link

anthonymobile commented Aug 16, 2022

try passing the region as an environment variable with -e AWS_DEFAULT_REGION="us-east-1".

had this same problem and then was stopped in the lakeview web page with "Unable to locate credentials".

possible that both errors are the result of lack of support in lakeview for SSO access tokens? lakeview container has access to ~/.aws but can't seem to find the credentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants