Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

insert data from lambda to dynamodb

const params = {
  TableName : 'TableName',
  Item: {
     HashKey: 'haskey',
     NumAttribute: 1,
     BoolAttribute: true,
     ListAttribute: [1, 'two', false],
     MapAttribute: { foo: 'bar'},
     NullAttribute: null
  }
};

const documentClient = new AWS.DynamoDB.DocumentClient();

await documentClient.put(params).promise()
Source by docs.aws.amazon.com #
 
PREVIOUS NEXT
Tagged: #insert #data #lambda #dynamodb
ADD COMMENT
Topic
Name
1+1 =