Questions tagged [dynamoose]

Dynamoose is a modeling tool for Amazon's DynamoDB for Node.js, inspired by Mongoose.

Summary

Dynamoose is a modeling tool for Amazon's DynamoDB NoSQL database service, written in for use with . Although inspired by , there are some key differences between the two packages due to differences between and .

Questions

Questions tagged with should not be tagged with .

Questions about server administration can be asked on https://dba.stackexchange.com.

Installation

$ npm i dynamoose

Resources

93 questions
11
votes
3 answers

Expected 'property' to be of type string, instead found type object - Dynamoose

I am working with AWS DynamoDB and Dynamoose trying to fetch records using Scan function, but facing an issue that is not recognizable for me. Stragenly, it's able to fetch records from another table in the same way and successfully get the…
Owais Aslam
  • 1,577
  • 1
  • 17
  • 39
4
votes
2 answers

Equivalent of Schema.Types.ObjectId in Dynamoose

I'm creating a snippet manager using Node and React just as a bit of a learning project that we might be able to use where I work. I had it set up previously using Express, Mongoose and mLab. With the mindset of learning and challenging myself I…
Luke Todd
  • 123
  • 1
  • 6
4
votes
1 answer

Dynamoose List of Maps in schema

I have in my DynamoDB database a table containing an element as a List of Maps. Each Map item does not have any specific structure. I've tried to describe it like this: const schema = new dynamoose.Schema({ Id: { type: String, hashKey:…
Raphael
  • 563
  • 1
  • 10
  • 22
3
votes
1 answer

Slow on fetching records from DynamoDB table

I have a DynamoDB table with 151 records, table size is 666 kilobytes and average item size is 4,410.83 bytes. This is my table schema: uid - partition key version - sort key status - published archived - boolean ... // other attributes When I'm…
AllenC
  • 2,754
  • 1
  • 41
  • 74
3
votes
1 answer

How to model a relationship in Dynamoose/DynamoDB?

I need the user to be linked with the invoice. In SQL database it would be a foreign key. How can I do this in Dynamoose? const dynamoose = require('dynamoose'); const uuid = require('uuid'); const config =…
3
votes
2 answers

How do I query an index properly with Dynamoose

I'm using Dynamoose to simplify my interactions with DynamoDB in a node.js application. I'm trying to write a query using Dynamoose's Model.query function that will search a table using an index, but it seems like Dynamoose is not including all of…
Mel Stanley
  • 375
  • 2
  • 8
3
votes
1 answer

Dynamoose- error while saving custom type using object: Expected xxx to be of type object, instead found type object

I'm trying to migrate my mongoose code/db to dynamoose/dynamodb. I get the following exception while trying to save custom object: TypeMismatch: Expected name to be of type object, instead found type object Here is my sample code on nodejs /…
Sanky
  • 193
  • 13
2
votes
0 answers

How to prevent Jest from running tests as globalSetup is still running?

My global setup code creates a dynamodb table and the global teardown destroys it. The code is just generic dynamodb.createTable() and dynamodb.deleteTable() My basic test that just wants to return a list of inserted entities: describe('Test suite',…
2
votes
2 answers

Is it possible that aws-sdk/dynamoose causes an SQLite syntax error on DynamoDB local?

Context: Problem found while upgrading from Nodejs 6 to 12 and with that the project's dependencies. Using dynamoose 2.3 Containerized application using docker-compose: backend and dynamodb instance only Docker file for dynamodb: FROM…
EDG956
  • 797
  • 8
  • 23
2
votes
0 answers

Scan in array of Nested Objects - DynamoDB

So, i am trying to filter objects inside of an array using dynamo db. This is my sample object client: { "name":"etc" "subscriptions": [ { "status": "canceled" ... other fields }, { "status": "active" ... other fields…
Vitor Kern
  • 21
  • 1
2
votes
3 answers

Exporting a Dynamoose Typescript model

The dynamoose library provides the following signature for constructing a model: model: { (name: string, schema?: SchemaDefinition | Schema, options?: Partial): T & Model &…
beatyt
  • 98
  • 1
  • 9
2
votes
0 answers

Connect to DAX cluster using dynamoose (nodejs)

I am trying to connect to dax cluster from my node application // Set document client to use dax cluster var daxClient = null; dynamoose.AWS.config.update({ region: 'us-east-1' }); var dax = new AmazonDaxClient({ endpoints:…
2
votes
3 answers

What are hash keys and range keys in dynamodb and how to use them

I was currently looking into dynamodb documentation and it is not clear about what hash keys and range keys are and how should they be used. I just need a basic explanation of what they are and how I am supposed to use them so that I can move…
Sagar Acharya
  • 1,763
  • 2
  • 19
  • 38
2
votes
2 answers

Dynamoose - cannot query and where with 2 keys

I have opened a related issue on GitHub, but maybe someone here will be able to help quicker. Summary: ValidationException: Query key condition not supported I need to find records in last (amount) seconds on a given location. Pretty simple, but…
Marek Urbanowicz
  • 12,659
  • 16
  • 62
  • 87
2
votes
1 answer

How to skip,sort and limit using dynamoose?

I previously used MongoDB and mongoose, now try to implement dynamoose in my app, how to write the same query in dynamoose for below-shown mongoose query? return this.scan({ abcd: { $ne: null }, activeFlag: true }).skip(9 * (page - 1)).sort({ date:…
Sabreena
  • 619
  • 2
  • 11
  • 25
1
2 3 4 5 6 7