Unable to locate credentials while trying to connect to DynamoDb in docker-compose installation

Successfully tested out table creation and population on the local environment by setting AWS credentials using aws configure command on CLI. Facing issues while trying to perform the same operation in the docker-compose installation.

Am getting the following error while trying to use DynamoDb as tracker store in the docker-compose installation on ec2 instance:

> Starting Rasa X in production mode... 🚀
**ConnectionException: Cannot connect to tracker store.Unable to locate credentials**
    return self._send_request(request_dict, operation_model)
  File "/opt/venv/lib/python3.8/site-packages/botocore/endpoint.py", line 132, in _send_request
    request = self.create_request(request_dict, operation_model)
  File "/opt/venv/lib/python3.8/site-packages/botocore/endpoint.py", line 115, in create_request
    self._event_emitter.emit(event_name, request=request,
  File "/opt/venv/lib/python3.8/site-packages/botocore/hooks.py", line 357, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/opt/venv/lib/python3.8/site-packages/botocore/hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "/opt/venv/lib/python3.8/site-packages/botocore/hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "/opt/venv/lib/python3.8/site-packages/botocore/signers.py", line 93, in handler
    return self.sign(operation_name, request)
  File "/opt/venv/lib/python3.8/site-packages/botocore/signers.py", line 165, in sign
  File "/opt/venv/lib/python3.8/site-packages/botocore/auth.py", line 378, in add_auth
    raise NoCredentialsError()
botocore.exceptions.NoCredentialsError: Unable to locate credentials
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/opt/venv/lib/python3.8/site-packages/sanic/app.py", line 1170, in run
  File "/opt/venv/lib/python3.8/site-packages/sanic/server.py", line 832, in serve
    trigger_events(before_start, loop)
  File "/opt/venv/lib/python3.8/site-packages/sanic/server.py", line 648, in trigger_events
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/opt/venv/lib/python3.8/site-packages/rasa/core/run.py", line 255, in load_agent_on_start
    _tracker_store = TrackerStore.create(endpoints.tracker_store, event_broker=_broker)
  File "/opt/venv/lib/python3.8/site-packages/rasa/core/tracker_store.py", line 132, in create
    raise ConnectionException(
rasa.shared.exceptions.ConnectionException: Cannot connect to tracker store.Unable to locate credentials
sys:1: RuntimeWarning: coroutine 'Loop.create_server' was never awaited

Here is what my docker-compose.override.yml file looks like: dc_override.yml (5.8 KB)

I have exactly the same problem with my sony xa1 since July 4 have you found a solution[?](https://www.surgecardinfo.net/)

Hi Did you have a fix on this issue guys? Facing same. https://www.mybkexperience.review

To fix the issue of not being able to locate AWS credentials while trying to connect to DynamoDB in a Docker Compose installation, you need to make sure that your AWS credentials are properly configured and accessible from within the Docker container.

One solution is to pass your AWS credentials as environment variables to your Docker container. To do this, you can define environment variables in your docker-compose.yml file that reference your AWS access key and secret access key. For example: version: “3” services: myapp: image: myapp:latest environment: AWS_ACCESS_KEY_ID: <your_access_key> AWS_SECRET_ACCESS_KEY: <your_secret_access_key> Alternatively, you can mount your AWS credentials file (usually located at ~/.aws/credentials) into the Docker container by specifying a volumes section in your docker-compose.yml file. For example: version: “3” services: myapp: image: myapp:latest volumes: - ~/.aws:/root/.aws This will mount your local .aws directory into the Docker container at the same location, allowing your credentials file to be accessed. Make sure to restart your Docker containers after making changes to your docker-compose.yml file.