[Answered ]-How to connect AWS Keyspace using Django Cassandra Engine?

1👍

Figured out:-

DATABASES = {
'default': {
    'ENGINE': 'django_cassandra_engine',
    'NAME': 'KEYSPACE_NAME',
    'HOST': 'cassandra.us-east-1.amazonaws.com',
    'OPTIONS': {
        'replication': {
            'strategy_class': 'SimpleStrategy',
            'replication_factor': 1
        },
        'connection': {
            'port': 9142,
            'ssl_context': ssl_context,
            'auth_provider': PlainTextAuthProvider(username='USERNAME',
                                                   password='PASSWORD')

        }

    }
}

}

0👍

I haven’t used Keyspaces or Cassandra, but from looking at the endpoint documentation and python examples in AWS, I’m guessing that the port should be 9142 instead of 9042.

Leave a comment