Role doesn't exist error

I have a scylladb cluster deployed in a KinD Kubernetes cluster. I have verified the cluster is running as I can connect with cqlsh and create new roles (authentication and authorization have been configured).

I have a Java application that uses the AWS DynamoDB SDK (v2) that I’m trying to get to connect to the scylla cluster that I deploy into the KinD cluster.

package com.beckman.ls.fap;

import java.net.URI;
import java.util.logging.Logger;

import software.amazon.awssdk.auth.credentials.SystemPropertyCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;

public class Handler {
    private static final Logger logger = Logger.getLogger(Handler.class.getName());

    private DynamoDbClient dynamoDbClient;

    private static SystemPropertyCredentialsProvider credentialsProvider = SystemPropertyCredentialsProvider.create();

    public Handler() {
        logger.info(String.format("Access key = %s, Secret key = %s",
                credentialsProvider.resolveCredentials().accessKeyId(),
                credentialsProvider.resolveCredentials().secretAccessKey()));

        dynamoDbClient = DynamoDbClient.builder().region(Region.US_EAST_2).credentialsProvider(credentialsProvider)
                .endpointOverride(URI.create("http://simple-cluster-client.scylla.svc:8000"))
                .build();
    }

    public DynamoDbClient getDynamoDbClient() {
        return dynamoDbClient;
    }
}

I am able to create the dynamoDbClient, but when I try to use it I get:

software.amazon.awssdk.services.dynamodb.model.InternalServerErrorException: Internal server error: auth::nonexistant_role (Role  doesn't exist.) ...

I’m properly passing the ScyllaDb role I created and its salted hash password:

INFO: Access key = fap, Secret key = $6$LwvH9YXnPQsyLnp0$GrF6rPpDWHcNGJ5PxbGvBRxGg6GOzAifcQsx3NlUSBu.vHSni8rzVXBTjfPsmikJlUnhlbJ1MJjzyRDznFCDb.                                  │

I have created the fap role and given it all permissions to all key spaces.

What am I doing wrong? Or what am I missing?

Thank you in advance,
Chuck

Just to make sure, have you followed Using Alternator (DynamoDB) section from Scylla Operator docs?

Are you facing the same issues with aws dynamodb cli?

1 Like