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

DynamoDB back end? #98

Open
richardgavel opened this issue Mar 29, 2022 · 7 comments
Open

DynamoDB back end? #98

richardgavel opened this issue Mar 29, 2022 · 7 comments

Comments

@richardgavel
Copy link

Since Citizen is already AWS aware (using S3 as a backend for its packages), I wonder how hard it would be to use DynamoDB as a DB, borrowing from the implementation to use MongoDB. I know AWS does support managed MongoDB (via DocumentDB). However, that can be somewhat expensive, especially in a HA scenario, since the smallest size is a t3.medium. Especially since more than likely, the server is going to see very little activity. A serverless DB store might be a great option to have.

@joeykhashab
Copy link

Has anyone had anyone had luck trying to get AWS DocumentDB to work? When I pass in the URL for documentDB for CITIZEN_MONGO_DB_URI and I just get a connection refused when citizen loads up.

@richardgavel
Copy link
Author

I did get DocumentDB to work (in my prior job, so don't have access to see details anymore). Are you sure you had the necessary security groups set up to allow port 27017 to communicate from citizen server to documentdb?

@joeykhashab
Copy link

interesting, yeah the security groups were fine. I manually logged into the ec2 instance that citizen was running on and used a "nc" command to verify the connection. The nc command worked.

Were you using 0.4.0 version or the master version of citizen?

did you have to create a database in DocumentDB manually before citizen connects to it?

@richardgavel
Copy link
Author

richardgavel commented Oct 11, 2022 via email

@atomixer
Copy link

@joeykhashab I don't think Documentdb will work with citizen because Prisma only supports Mongodb version 4.2 and above. Documentdb is currently at version 4.0 so unless Amazon adds support for the newer versions of Mongodb, documentdb isn't really an option. Prisma adding support for Mongo v4.0 also seems unlikely.

I was able to hookup the citizen server (v6.0) with a Documentdb instance (v4.0) but I kept running into errors when I tried to version modules.

@richardgavel-ordinaryexperts
Copy link

Yeah, when I got it to work, it was a version of Citizen so old that it didn't even have the HCL2 support in there, so at best it was 0.3.3. Looks like Prisma was added with 0.6.0. So it's possible that earlier versions might work.

@richardgavel-ordinaryexperts

DocumentDB now apparently supports the MongoDB 5.0 compatability: https://docs.aws.amazon.com/documentdb/latest/developerguide/compatibility.html

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

4 participants