Questions tagged [amazon-dynamodb-index]

251 questions
1
vote
0 answers

AWS Dynamodb how to implement checking for uniqueness across email and phone number of a user

I am creating AWS lamda function to create a customer ( lead ) , but before creating the customer i need to check if the user already exists . A customer/lead can be identified by combination of email and phone number . here is my table definition…
1
vote
1 answer

Go DynamoDB Query returns no item with Filter and Limit=1

I've following dynamoDB table user_id date game user1 2021-12-06 14:36:46 game1 user1 2021-12-06 15:36:46 game1 user1 2021-12-07 11:36:46 game2 user1 2021-12-07 12:36:46 game2 partition key: user_id sort key: date I want to Query…
1
vote
0 answers

DynamoDB Single Table Design guidance

First time building a single table design and was just wondering if anyone had any advice/feedback/better ways on the following plan? Going to be building a basic 'meetup' clone. so e.g. Users can create events, and then users can attend those…
1
vote
0 answers

How to query DynamoDB in AWS using a number partition key

I'm currently having trouble querying a DynamoDB table where the partition key, id, is of type number. This is for a wider project for my own Alexa Skill on AWS. My skill will take as input from the user, a unique id value, which is of slot type…
1
vote
1 answer

What is the maximum number non-key attributes of Global Secondary Index (GSI) in DynamoDB?

According to the AWS doc, we can have at most 20 non-key attributes in local secondary index (LSI) in DynamoDB, but how about global secondary index? The issue we encountered is we want to include more than 20 non-key attributes in GSI, but we could…
haohaolee
  • 677
  • 1
  • 9
  • 16
1
vote
1 answer

Querying on Global Secondary indexes with a usage of contains operator

I've been reading a DynamoDB docs and was unable to understand if it does make sense to query on Global Secondary Index with a usage of 'contains' operator. My problem is as follows: my dynamoDB document has a list of embedded objects, every object…
1
vote
0 answers

LocalSecondaryIndex using dynamodb enhanced client

Dynamodb enhanced client has annotations for global secondary index but nothing is mentioned about local secondary indices. Can someone suggest what is the best way to use localsecondaryindex with dynamodb enhanced client?
1
vote
1 answer

GSI vs redundancy dynamoDB

I have this scenario: I have to save in dynamoDB table a lot of shops. Every shop has a ID string and its PK. Every shop has a field "category" that is a string that indicates its category (food,tatoo ...). So far everything is ok. I have this…
1
vote
2 answers

How to query dynamoDB using other partition key

My dynamoDB table look like this And what I want to achieve is: I want to get all product which the seller is active -> which will return only product with ID #1 -> Yeezy Boost 380. Right now I can only think this way: Get all seller with active…
1
vote
1 answer

Will a dynamodb GSI double the cost of writes for my table?

A write to the base table also writes to the GSI. If I project all the attributes, will it basically double the cost I currently pay for writes? Also as an extra question, I have an LSI setup. That incurs costs on all my writes that I have that LSIs…
user12530264
1
vote
1 answer

What is the efficient way to select hash key and sort key in DynamoDB for the given table?

I am setting up DynamoDB. Our data is simple, it has four fields: UserName UserShiftEndDate UserProjectCode UserActivities Ideally, we should query the users based on the UserShiftEndDate. None of the fields/combination in our data is unique. I…
1
vote
1 answer

Dynamo Db SDK for .NET - what is the preferable way to query data by key?

I see that IDynamoDBContext from official AWS SDK for DynamoDb has different methods to query stored data: Task LoadAsync(object hashKey, object rangeKey, CancellationToken cancellationToken = default (CancellationToken)); …
1
vote
1 answer

Query DynamoDB using a GSI and a range key

I have a table (Profile) with a Hash key (id), and I have a GSI on name, and a range key on country. I would like to create a DAO method which would fetch me all the records with a given value for name and country, something like this: List…
1
vote
0 answers

Are AWS DynamoDB sparse indexes allowed on GSI Global Secondary Indexes?

So, with a very simple DynamoDB table, with Primary key let's say: Address: string (eg: '1 someRd,someCity,someCounty' and a GSI: Postcode: string If I try to manually add an item to the table, with just an Address field and no Postcode, it…
Leigh Mathieson
  • 1,658
  • 2
  • 17
  • 25
1
vote
2 answers

Conditionally put Item into DynamoDB

In my Lambda function, I want to conditionally put items into my DynamoDB only if the value DOESN'T EXIST already. I saw multiple different sources where they use this ConditionExpression and i cant figure out whats wrong with that. body = await…