amazon-dynamodb

Dynamo db export to csv

大兔子大兔子 提交于 2021-02-10 14:24:23
问题 I have a serverless project, I'm trying to export Dynamo DB tables into single csv, and then upload it to S3. All npm modules i checked export single table. Is there a way to export multiple table data into one single csv? 回答1: The AWS CLI can be used to download data from Dynamo DB: aws dynamodb scan --table-name my-table --select ALL_ATTRIBUTES --page-size 500 --max-items 100000 The --page-size is important, there is a limit of 1M (megabyte) for every query result. 回答2: To export as a CSV,

Cant unmarshall dynamodb attribute

眉间皱痕 提交于 2021-02-09 11:47:22
问题 I'm experimenting with AWS-SDK-GO with the DynamoDB API... I'm trying to query the db and return a string. But I'm having some issues unmarshelling the return value.... struct type Item struct { slug string destination string } query function input := &dynamodb.GetItemInput{ Key: map[string]*dynamodb.AttributeValue{ "slug": { S: aws.String(slug), }, }, TableName: db.TableName, } result, err := db.dynamo.GetItem(input) if err != nil { return "", err } n := Item{} err = dynamodbattribute

How do I use DynamoDBAutoGeneratedKey to give me an auto generated key?

拜拜、爱过 提交于 2021-02-08 15:12:37
问题 I need to use DynamoDBAutoGeneratedKey from the AWS SDK to give me a random key(of type String) that I can then use to do something. I can't find any examples online of doing this, and while it seems like it should be relatively straightforward I am really struggling to get this working. Can anyone link me to an example of this being used? 回答1: Found easy answer. String uniqueID = UUID.randomUUID().toString(); Screw using DynamoDBAutoGeneratedKey, sounds like a headache. 回答2: @DynamoDBTable(

How do I use DynamoDBAutoGeneratedKey to give me an auto generated key?

老子叫甜甜 提交于 2021-02-08 15:11:16
问题 I need to use DynamoDBAutoGeneratedKey from the AWS SDK to give me a random key(of type String) that I can then use to do something. I can't find any examples online of doing this, and while it seems like it should be relatively straightforward I am really struggling to get this working. Can anyone link me to an example of this being used? 回答1: Found easy answer. String uniqueID = UUID.randomUUID().toString(); Screw using DynamoDBAutoGeneratedKey, sounds like a headache. 回答2: @DynamoDBTable(

Temporarily disable DynamoDB Lambda Triggers / Stream

老子叫甜甜 提交于 2021-02-08 05:31:52
问题 I'm looking for a way to temporarily disable Lambda triggers on a DynamoDB. I want to be able do apply manual Updates on a table (e.g. such as importing data from a S3 backup) without the Lambda code being triggers. I tried the disable button next to the trigger in the lambda functions "Trigger" tab. I also tried to disable the whole Stream for the table. In both cases, when reactivating the trigger/stream all the trigger events (that happened, while they were deactivated) are executed then.

Temporarily disable DynamoDB Lambda Triggers / Stream

こ雲淡風輕ζ 提交于 2021-02-08 05:31:32
问题 I'm looking for a way to temporarily disable Lambda triggers on a DynamoDB. I want to be able do apply manual Updates on a table (e.g. such as importing data from a S3 backup) without the Lambda code being triggers. I tried the disable button next to the trigger in the lambda functions "Trigger" tab. I also tried to disable the whole Stream for the table. In both cases, when reactivating the trigger/stream all the trigger events (that happened, while they were deactivated) are executed then.

CircleCI DynamoDB Local

六眼飞鱼酱① 提交于 2021-02-08 04:29:12
问题 I'm trying to get it setup so CircleCI can use DynamoDB Local in my tests. I saw this link about how to install DynamoDB Local on CircleCI but it looks outdated since they have now moved to new syntax with CircleCI 2. How can I achieve this on the latest versions of CircleCI? 回答1: You can adapt the old instructions into the new, using the build step 'command'. You will have to play with it a bit to get it to work as I'm not familiar with the software: version: 2 jobs: build: docker: - image:

DynamoDB queries on secondary index, how to define the indexes

拈花ヽ惹草 提交于 2021-02-07 18:09:23
问题 I've been going around and around this and it's just not clear what to do. I have a simple table where I want to make queries against several columns. As I understand it, that means creating a secondary index for each column there is to query against. I've defined the table -- using the Serverless framework serverless.yml -- and am getting a variety of strange error messages. The current serverless.yml definition is: resources: Resources: MessagesDynamoDBTable: Type: 'AWS::DynamoDB::Table'

DynamoDB queries on secondary index, how to define the indexes

这一生的挚爱 提交于 2021-02-07 18:07:34
问题 I've been going around and around this and it's just not clear what to do. I have a simple table where I want to make queries against several columns. As I understand it, that means creating a secondary index for each column there is to query against. I've defined the table -- using the Serverless framework serverless.yml -- and am getting a variety of strange error messages. The current serverless.yml definition is: resources: Resources: MessagesDynamoDBTable: Type: 'AWS::DynamoDB::Table'

how can we update dynamodb table based on index(not based on primary has and range key)

走远了吗. 提交于 2021-02-07 13:53:39
问题 how can we update dynamodb table based on index(not based on primary has and range key). I have a index created by name key_id-index and hash is asset_id and range is hit_id . i want to update the table based on key_id-index because i wouldn't know those while updating. var paramsu = { TableName: 'asset', //IndexName: 'key_id-index', Key: { // The primary key of the item (a map of attribute name to AttributeValue) asset_id: { S: 'a' }, hit_id: { S: 'h' } // more attributes... },