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

Amazon Keyspaces as a backend #120

Open
pboisso opened this issue Dec 1, 2022 · 3 comments
Open

Amazon Keyspaces as a backend #120

pboisso opened this issue Dec 1, 2022 · 3 comments

Comments

@pboisso
Copy link

pboisso commented Dec 1, 2022

Hi,

I'm wondering if anyone successfully ran prebid-cache using an AWS Keyspaces managed cache backend?

My first try is resulting in this error : Error creating Cassandra backend: gocql: unable to create session: unable to discover protocol version: dial tcp 3.234.248.205:9042: i/o timeout

Hosts and keyspace settings were defined the config.yaml

Any insights would be helpful. Thanks.

@pboisso
Copy link
Author

pboisso commented Dec 1, 2022

For those interested, I got it working following instructions in this page : https://docs.aws.amazon.com/keyspaces/latest/devguide/using_go_driver.html

Had to modify cassandra.go Init function adding these lines...

// AWS Keyspaces service support

c.cluster.Authenticator = gocql.PasswordAuthenticator{
        Username: "username",
        Password: "password"}
		
// provide the path to the sf-class2-root.crt
c.cluster.SslOpts = &gocql.SslOptions{
        CaPath: "sf-class2-root.crt",
        EnableHostVerification: false,            
 }
 
//Override default Consistency to LocalQuorum
c.cluster.Port = 9142
 c.cluster.Consistency = gocql.LocalQuorum
 c.cluster.DisableInitialHostLookup = false

I see prebid-cache now reading and writing to Amazon Keyspaces. Note that I also had to manually create the table in Amazon Keyspaces.

@bretg
Copy link
Contributor

bretg commented Dec 2, 2022

Thanks for posting a solution @pboisso - will keep this issue open and add to docs somewhere.

@SyntaxNode
Copy link
Contributor

@pboisso We have not forgotten about this request, but it is relatively low on our priority list. If you (or anyone) needs it sooner than we can get to it, you're welcomed to open a PR.

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

No branches or pull requests

3 participants