Questions tagged [pynamodb]
34 questions
0
votes
1 answer
How to instantiate a class model with a Local Secondary Index using PynamoDB?
I need to instantiate a class model that uses a Local Secondary Index with the PynamoDB library, but I'm getting errors. My code:
class MyIndex(LocalSecondaryIndex):
class Meta:
projection = AllProjection()
org_id =…

RTF
- 6,214
- 12
- 64
- 132
0
votes
1 answer
PynamoDb - Increment operation
Is there a way to do the below code snippet using pynamodb?
dynamoDB.updateItem({
TableName: "Users",
Key: { "UserId": { S: "c6af9ac6-7b61" } },
ExpressionAttributeValues: { ":inc": {N: "1"} },
UpdateExpression: "ADD loginCount :inc"
})
I…

Jimson James
- 2,937
- 6
- 43
- 78
0
votes
0 answers
Retrieve data from dynamodb using pynamodb
I'm getting started with pynamodb (and dynamodb), and can't figure out how to use it.
I have:
A dynamodb table
A lambda
Running this code inside a lambda, I can successfully create two entries (I see them in the dynamodb Management Console):
class…

Eric
- 477
- 3
- 17
0
votes
1 answer
PynamoDB Single Table Design OrgsAndUsers
I am trying to create this single table using pynamodb:
This is what I have for the OrgModel:
TABLE_NAME = 'OrgsAndUsers'
class OrgModel(Model):
class Meta:
table_name = TABLE_NAME
region = 'us-east-1'
OrgName =…

Software Dev
- 910
- 3
- 10
- 27