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
0
votes
0 answers

Dynamoose: No table has been registered

I have a Dynamodb table that is being queried using Dynamoose but I am getting an error when the query is being run: CustomError [OtherError]: No table has been registered for dev-production-history-table model. Use `new dynamoose.Table` to register…
Darren
  • 9
  • 6
0
votes
0 answers

dynamoose throws TypeError

Somehow the most basic dynamoose example throws following error: Cannot read property 'includes' of undefined Code: import * as dynamoose from 'dynamoose'; import { Document } from 'dynamoose/dist/Document'; type User = { id: string; …
joe.hart
  • 185
  • 1
  • 2
  • 8
0
votes
1 answer

Why can i not get records has an array field contains primary key value in dynamoosejs?

I'm new to the dynamodb. I'm encountering an irritating problem I have a record stored in the dynamodb like this: { bmgIds: ["d5a03ea2-e06e-5d01-84b7-94530b1059f7"], id: "d5a03ea2-e06e-5d01-84b7-94530b1059f7", ..... } as you see, bmgIds array…
Xander Le
  • 44
  • 5
0
votes
0 answers

Dynamoose and DynamoDB Secondary Index searching

i'm trying to search a table based on 2 attributes. However i'm getting the following error: ValidationException: Query condition missed key schema element What i'm doing: let value = 'dsadsada'; Cache.query({'registration': { 'eq': value},…
Martyn Ball
  • 4,679
  • 8
  • 56
  • 126
0
votes
1 answer

How to use existing DynamoDB tables in Dynamoose.js

We are creating DynamoDB tables in AWS using terraform. Our application is a Nest.js application using nestjs-dynamoose and is deployed as a Lambda function. The lambda function is started without any error. The create option in dynamoose is set to…
cstrauss
  • 13
  • 1
  • 5
0
votes
2 answers

Dynamoose Nested Map/Array in TypeScript Schema

I'm trying to create a schema for the following example: { "foods": [ { "fruits": [{ "apple": { "color": "red", "shape": "round" } }] …
beatyt
  • 98
  • 1
  • 9
0
votes
1 answer

searching in list of values in dynamodb schema using dynamoose in node

I have a dynamo db schema lets say goes like this const team = new dynamoose.Schema( { bitbucketDetails: [ { id: { type: String, required: true, }, repository: { type: String, …
Nirmesh
  • 305
  • 5
  • 12
0
votes
3 answers

Dynamoose model update with hash key

I'm trying to execute an update against a dynamoose model. Here's the docs on calling model.update Model.update(key[, updateObj[, settings]],[ callback]) key can be a string representing the hashKey or an object containing the hashKey &…
KyleMit
  • 30,350
  • 66
  • 462
  • 664
0
votes
1 answer

Dynamoose: The provided key element does not match the schema

Hi I know that the following error: The provided key element does not match the schema has a few answers on here but none of them helps me as I've already applied the advice to my problem and it still persists. I'm using Dynamoose and Koa.js for…
avatarhzh
  • 2,175
  • 4
  • 21
  • 32
0
votes
1 answer

Querying OR condition in Dynamoose

I need dynamoose query equivalent to this SQL query select * from employees where first_name like '%fish%' or last_name like '%fish%'. I tried below code but doesn't work. const employees = EmsModel.query('pk') .eq('emp_prof') .and() …
Udhaya
  • 121
  • 1
  • 14
0
votes
1 answer

User is not authorized to perform: dynamodb:CreateTable on resource:

When I tried to run my lambda function register which queries the table example_user, it will throw the error below. My code is only trying to get data from the table example_user and not create any…
imin
  • 4,504
  • 13
  • 56
  • 103
0
votes
1 answer

How use dynamoose in aws lambda function?

Actually, I am new to AWS Lambda functions and Amazon DynamoDB, so I could not find a way to create a table with a Dynamoose schema and create CRUD operation with it. I am familiar with mongoose and I read that Dynamoose is inspired by it. So, can…
0
votes
1 answer

DynamoDB/Dynamoose error using query with .in() operator

I'm creating a chat application and using Dynamoose.js. I have a conversations table and a messages table. I want to query on the messages table to find all messages belonging to a conversation. When I make the query, I'm getting the following…
0
votes
1 answer

How do I access value of an attribute with an object with no key pairs?

I am working with dynamoose and a query returns me the following output [ Document { cost: 100 }, lastKey: undefined, count: 1, queriedCount: undefined, timesQueried: 1 ] When I try to do typeof(output) , it returns Object When I try to…
0
votes
1 answer

Find the corrupted doc in DynamoDB

I am using dynamoose to scan a table. However one key (or more) seems to be corrupted. The scan fails with this error: Expected _modifiedAt to be of type number, instead found type object The Schema is expecting a Number but somewhere in the table…
Ben Bieler
  • 1,518
  • 1
  • 14
  • 22