citizen icon indicating copy to clipboard operation
citizen copied to clipboard

DynamoDB back end?

Open richardgavel opened this issue 2 years ago • 7 comments

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.

richardgavel avatar Mar 29 '22 20:03 richardgavel

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.

joeykhashab avatar Mar 31 '22 19:03 joeykhashab

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?

richardgavel avatar Mar 31 '22 19:03 richardgavel

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?

joeykhashab avatar Apr 01 '22 13:04 joeykhashab

Yes, i created the database ahead of time. And this was a fairly old version of citizen.

On Fri, Apr 1, 2022 at 8:52 AM joeykhashab @.***> wrote:

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?

— Reply to this email directly, view it on GitHub https://github.com/outsideris/citizen/issues/98#issuecomment-1085927106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5SUDYWE762QIGGHWL4PELVC35P7ANCNFSM5R7RW46A . You are receiving this because you authored the thread.Message ID: @.***>

richardgavel avatar Oct 11 '22 07:10 richardgavel

@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.

atomixer avatar Oct 18 '22 14:10 atomixer

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.

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