Questions tagged [aws-documentdb]

for general development and technical questions about Amazon DocumentDB with MongoDB compatible API.

For general development and technical questions about Amazon DocumentDB with MongoDB compatible API.

447 questions
3
votes
2 answers

DocumentDB long running query times out even with maxTimeMS:0

I am trying to query documentDB with 500M documents (1Tb). var t1 = Date.now(); 'Total X Records:'; db.runCommand({aggregate: "house", pipeline: [{$project: {'_id': 1, 'foo.x': 1}}, {$match: {'foo.x.y': {$in: ['2018-12-15']}}}, {$unwind:…
oshaiken
  • 2,593
  • 1
  • 15
  • 25
3
votes
2 answers

multiple fields of compound index cannot be arrays

I am getting this error while migrating data from mongodb to documentdb. Indexes were created on documentdb side without problems. 2019-04-26T17:40:20.118+0000 error: multiple fields of compound index cannot be…
oshaiken
  • 2,593
  • 1
  • 15
  • 25
3
votes
3 answers

How to connect to Amazon DocumentDB from Node.js

How do I connect to Amazon's new DocumentBD database from node.js (In this case, using an out-of-the-box Elastic Beanstalk setup.) This is my code, copied from the docs (with some values altered for privacy). It just times out and the eventual value…
3
votes
1 answer

Connect To Amazon DocumentDB with R Mongolite

I Have my own AWS DocumentDB and I'm trying to connect to it in R using Mongolite Package I tried to do this with mongolite ssl_options with this code: mong <- mongo(collection = "test", db = "test" ,url…
omarahmedm93
  • 71
  • 1
  • 8
2
votes
0 answers

Query Mongo (Documentdb) for records in indexed array of ObjectIds

I have a users collection and an accounts collection (simplified below) db.users.insertMany([{ '_id': ObjectId('64595cf18ee18d1695940b70'), 'name': 'Link', }, { '_id': ObjectId('64595cf18ee18d1695940b71'), 'name': 'Navi', }, { …
Joel Harris
  • 1,966
  • 3
  • 20
  • 32
2
votes
1 answer

Create a documentDB cluster in an aws-cdk TS file, and put it as a source of event with EventSourceMapping

I have a cdk (with the 2.61 version) application with CRUD Lambdas, a document DB cluster and an appsync api. I have to register in the same documentDB database the stream events that come from the CRUD operations the lambdas are doing. I enabled…
2
votes
1 answer

Is there a way to insert a record with a value from another record

I have case of collection that holds "item" data, with required node "owner" and optional node "status", e.g. { _id: 123, item: {some: "data 123" }, owner: {id: 456} } { _id: 124, item: {some: "data 124" }, owner: {id: 789}, status: { ok: 1} } and…
ggogggo
  • 23
  • 3
2
votes
1 answer

Clojure - How to connect to MongoDB/DocumentDB via TLS Connection using Monger

I am not able to connect via TLS and monger to an AWS DocumentDB database. I downloaded the PEM file from AWS and added it to a new keystore file keytool -import -alias documentdb_certs -storepass SomePassword -keystore documentdb_certs -file…
Andreas Guther
  • 422
  • 4
  • 7
2
votes
0 answers

AWS DocumentDB add field with value of existing field

I need to add a field to every document inside a collection and copy. The value of the new field should be a field that already exists in the document. The following solution is way to slow because it's about 400k documents and it only updates 80…
2
votes
1 answer

Is there anyway to disable "Retryable writes" to false in Spring Boot 2.2.1

First time I am trying to develop a controller to save data in DocumentDB in AWS. In the first time it saves, but in the second time, I am looking for this register saved in database, I got this and change some data, and save, but... I am getting…
Diego Macario
  • 1,240
  • 2
  • 21
  • 33
2
votes
2 answers

AWS Terraform tried to destory and rebuild documentdb

I created a documentdb cluster by terraform. When I run terraform plan, it tried to destroy the cluster and rebuild it, but I didn't change the value file. below is the main content of terraform script, resource "aws_docdb_subnet_group" "default" { …
jolla
  • 365
  • 1
  • 2
  • 15
2
votes
1 answer

Connecting to documentDB using mongodb 4.x node driver with port forwarding not working

I have locally setup a port forwarding to the documentDB that is working successfully on the mongodb driver versions 3.x. When I update the mongodb package to 4.x I am getting an error of a timeout with the reason ReplicaSetNoPrimary. The code is…
2
votes
3 answers

MongoDB/DocumentDB bson_append_array(): invalid array detected. first element of array parameter is not "0"

Recently I have migrated one of my projects (PHP 7.4/Lumen/Ubuntu 20.04) from MongoDB to MongoDB compatible AWS DocumentDB. Since the migration all the CLI Scripts are triggering this strange notice/warning bson_append_array(): invalid array…
M_R_K
  • 5,929
  • 1
  • 39
  • 40
2
votes
0 answers

Is there DocumentDB Role based Access control (RBAC) with regex database support?

Does MongoDB/Document DB support creating user and assign it to roles like(readWrite) to certain databases whose name follows certain patterns (like nonprod_*).
yogen48
  • 111
  • 1
  • 3
2
votes
0 answers

AWS DocumentDB Error: Client network socket disconnected before secure TLS connection was established

My AWS DocumentDB was working alright, but suddenly it started throwing the below error. MongoServerSelectionError: Client network socket disconnected before secure TLS connection was established at Timeout._onTimeout…
Lakshman Pilaka
  • 1,803
  • 2
  • 24
  • 48