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

NoCredentialsError: Unable to locate credentials #337

Open
SureshP44 opened this issue Apr 5, 2022 · 0 comments
Open

NoCredentialsError: Unable to locate credentials #337

SureshP44 opened this issue Apr 5, 2022 · 0 comments

Comments

@SureshP44
Copy link

Hi Guys..

I followed the official documentation to run the confidant locally using docker desktop. these are the following commands that i followed as of now.

1. docker pull lyft/confidant
2. docker run --env-file my_config -t lyft/confidant
  1. my_config file:
# The region our service is running in.
AWS_DEFAULT_REGION=ap-south-1
# The IAM role name of the confidant server.
AUTH_CONTEXT=''
# The KMS key used for auth.
AUTH_KEY=''
# The DynamoDB table name for storage.
DYNAMODB_TABLE='confidant-production'
# Auto-generate the dynamodb table.
DYNAMODB_CREATE_TABLE=true
# Set the gevent resolver to ares; see:
#   https://github.com/surfly/gevent/issues/468
GEVENT_RESOLVER=ares
# The KMS key used for at-rest encryption in DynamoDB.
KMS_MASTER_KEY=''
# A long randomly generated string for CSRF protection.
# SESSION_SECRET can be loaded via SECRETS_BOOTSTRAP
SESSION_SECRET=''
# The IP address to listen on.
HOST='0.0.0.0'
# The port to listen on.
PORT=80
# Trust X-Forwarded-Proto from any SSL termination server
FORWARDED_ALLOW_IPS='*'

the error messages.:

Failed to update IAM roles cache.
Traceback (most recent call last):
  File "/srv/confidant/confidant/services/iamrolemanager.py", line 19, in refresh_cache
    ROLES = _get_iam_roles()
  File "/srv/confidant/confidant/services/iamrolemanager.py", line 51, in _get_iam_roles
    return [x.name for x in iam_resource.roles.all()]
  File "/srv/confidant/confidant/services/iamrolemanager.py", line 51, in <listcomp>
    return [x.name for x in iam_resource.roles.all()]
  File "/venv/lib/python3.6/site-packages/boto3/resources/collection.py", line 83, in __iter__
    for page in self.pages():
  File "/venv/lib/python3.6/site-packages/boto3/resources/collection.py", line 166, in pages
    for page in pages:
  File "/venv/lib/python3.6/site-packages/botocore/paginate.py", line 255, in __iter__
    response = self._make_request(current_kwargs)
  File "/venv/lib/python3.6/site-packages/botocore/paginate.py", line 332, in _make_request
    return self._method(**current_kwargs)
  File "/venv/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/venv/lib/python3.6/site-packages/botocore/client.py", line 648, in _make_api_call
    operation_model, request_dict, request_context)
  File "/venv/lib/python3.6/site-packages/botocore/client.py", line 667, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "/venv/lib/python3.6/site-packages/botocore/endpoint.py", line 102, in make_request
    return self._send_request(request_dict, operation_model)
  File "/venv/lib/python3.6/site-packages/botocore/endpoint.py", line 132, in _send_request
    request = self.create_request(request_dict, operation_model)
  File "/venv/lib/python3.6/site-packages/botocore/endpoint.py", line 116, in create_request
    operation_name=operation_model.name)
  File "/venv/lib/python3.6/site-packages/botocore/hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/venv/lib/python3.6/site-packages/botocore/hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "/venv/lib/python3.6/site-packages/botocore/hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "/venv/lib/python3.6/site-packages/botocore/signers.py", line 90, in handler
    return self.sign(operation_name, request)
  File "/venv/lib/python3.6/site-packages/botocore/signers.py", line 157, in sign
    auth.add_auth(request)
  File "/venv/lib/python3.6/site-packages/botocore/auth.py", line 357, in add_auth
    raise NoCredentialsError
botocore.exceptions.NoCredentialsError: Unable to locate credentials

So Can someone help on this to resolve, like where to add the creds, and if i missed any steps, please point out..

Thanks in advance

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

No branches or pull requests

1 participant