SHARE
TWEET

Untitled

a guest Feb 14th, 2020 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. console.log('starting function');
  2.  
  3. const AWS = require('aws-sdk');
  4. const docClient = new AWS.DynamoDB.DocumentClient({region:'us-east-1'});
  5.  
  6. exports.handler = function(e, ctx, callback){
  7.    
  8.     let scanningParameters = {
  9.         TableName: 'tabela_projekt',
  10.         Limit:3
  11.     };
  12.    
  13.     docClient.scan(scanningParameters, function(err, data){
  14.         if(err){
  15.             callback(err, null);
  16.         }
  17.         else{
  18.             callback(null, data);
  19.         }
  20.     });
  21.    
  22.     /*var params = {
  23.         TableName: 'tabela_projekt',
  24.         Key: {
  25.             "mat_id": rekord1
  26.         }
  27.     }
  28.     docClient.get(params, function(err, data){
  29.         if(err){
  30.             callback(err, null);
  31.         }else{
  32.             callback(null,data);
  33.         }
  34.     })*/
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top