DynamoDB batchwriteItem don't put data to dynamic TableName in Lambda function
I am trying to write data to different tables, tablename is passed through get request.
var tableName = event.tableName.toString();
When I write hardcoded tableName it works fine but when I write variable Name it throws error.
2018-11-20T21:09:31.532Z 928e237c-ed08-11e8-a312-539d290e67fc {"errorMessage":"Requested resource not found","errorType":"ResourceNotFoundException","stackTrace":["Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)","Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)","AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)","/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"]}
END RequestId: 928e237c-ed08-11e8-a312-539d290e67fc
REPORT RequestId: 928e237c-ed08-11e8-a312-539d290e67fc Duration: 124.41 ms Billed Duration: 200 ms Memory Size: 1024 MB Max Memory Used: 33 MB
Here is the code:
var params = {
RequestItems: {
tableName : [
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r1index
},
"DateandTime" :{
"S": DnT1
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x11
},
"y1_axis":{
"S": y11
},
"z1_axis":{
"S": z11
},
"x2_axis":{
"S": x21
},
"y2_axis":{
"S": y21
},
"z2_axis":{
"S": z21
},
"latitude":{
"S": lat1
},
"longitude":{
"S":lng1
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r2index
},
"DateandTime" :{
"S": DnT2
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x12
},
"y1_axis":{
"S": y12
},
"z1_axis":{
"S": z12
},
"x2_axis":{
"S": x22
},
"y2_axis":{
"S": y22
},
"z2_axis":{
"S": z22
},
"latitude":{
"S": lat2
},
"longitude":{
"S":lng2
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r3index
},
"DateandTime" :{
"S": DnT3
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x13
},
"y1_axis":{
"S": y13
},
"z1_axis":{
"S": z13
},
"x2_axis":{
"S": x23
},
"y2_axis":{
"S": y23
},
"z2_axis":{
"S": z23
},
"latitude":{
"S": lat3
},
"longitude":{
"S":lng3
}
}
}
}
]
}
};
javascript node.js amazon-web-services aws-lambda amazon-dynamodb
add a comment |
I am trying to write data to different tables, tablename is passed through get request.
var tableName = event.tableName.toString();
When I write hardcoded tableName it works fine but when I write variable Name it throws error.
2018-11-20T21:09:31.532Z 928e237c-ed08-11e8-a312-539d290e67fc {"errorMessage":"Requested resource not found","errorType":"ResourceNotFoundException","stackTrace":["Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)","Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)","AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)","/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"]}
END RequestId: 928e237c-ed08-11e8-a312-539d290e67fc
REPORT RequestId: 928e237c-ed08-11e8-a312-539d290e67fc Duration: 124.41 ms Billed Duration: 200 ms Memory Size: 1024 MB Max Memory Used: 33 MB
Here is the code:
var params = {
RequestItems: {
tableName : [
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r1index
},
"DateandTime" :{
"S": DnT1
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x11
},
"y1_axis":{
"S": y11
},
"z1_axis":{
"S": z11
},
"x2_axis":{
"S": x21
},
"y2_axis":{
"S": y21
},
"z2_axis":{
"S": z21
},
"latitude":{
"S": lat1
},
"longitude":{
"S":lng1
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r2index
},
"DateandTime" :{
"S": DnT2
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x12
},
"y1_axis":{
"S": y12
},
"z1_axis":{
"S": z12
},
"x2_axis":{
"S": x22
},
"y2_axis":{
"S": y22
},
"z2_axis":{
"S": z22
},
"latitude":{
"S": lat2
},
"longitude":{
"S":lng2
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r3index
},
"DateandTime" :{
"S": DnT3
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x13
},
"y1_axis":{
"S": y13
},
"z1_axis":{
"S": z13
},
"x2_axis":{
"S": x23
},
"y2_axis":{
"S": y23
},
"z2_axis":{
"S": z23
},
"latitude":{
"S": lat3
},
"longitude":{
"S":lng3
}
}
}
}
]
}
};
javascript node.js amazon-web-services aws-lambda amazon-dynamodb
please add information how do you concatenate string to placetableName
in final code. Also add to your codeconsole.log(JSON.stringify(event));
to check what event contains
– guzial
Nov 20 '18 at 21:54
I am passing table name from get request. And I get it in console.log(); even table is present and region is also the same.
– Faizan Shah
Nov 20 '18 at 22:09
add a comment |
I am trying to write data to different tables, tablename is passed through get request.
var tableName = event.tableName.toString();
When I write hardcoded tableName it works fine but when I write variable Name it throws error.
2018-11-20T21:09:31.532Z 928e237c-ed08-11e8-a312-539d290e67fc {"errorMessage":"Requested resource not found","errorType":"ResourceNotFoundException","stackTrace":["Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)","Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)","AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)","/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"]}
END RequestId: 928e237c-ed08-11e8-a312-539d290e67fc
REPORT RequestId: 928e237c-ed08-11e8-a312-539d290e67fc Duration: 124.41 ms Billed Duration: 200 ms Memory Size: 1024 MB Max Memory Used: 33 MB
Here is the code:
var params = {
RequestItems: {
tableName : [
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r1index
},
"DateandTime" :{
"S": DnT1
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x11
},
"y1_axis":{
"S": y11
},
"z1_axis":{
"S": z11
},
"x2_axis":{
"S": x21
},
"y2_axis":{
"S": y21
},
"z2_axis":{
"S": z21
},
"latitude":{
"S": lat1
},
"longitude":{
"S":lng1
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r2index
},
"DateandTime" :{
"S": DnT2
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x12
},
"y1_axis":{
"S": y12
},
"z1_axis":{
"S": z12
},
"x2_axis":{
"S": x22
},
"y2_axis":{
"S": y22
},
"z2_axis":{
"S": z22
},
"latitude":{
"S": lat2
},
"longitude":{
"S":lng2
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r3index
},
"DateandTime" :{
"S": DnT3
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x13
},
"y1_axis":{
"S": y13
},
"z1_axis":{
"S": z13
},
"x2_axis":{
"S": x23
},
"y2_axis":{
"S": y23
},
"z2_axis":{
"S": z23
},
"latitude":{
"S": lat3
},
"longitude":{
"S":lng3
}
}
}
}
]
}
};
javascript node.js amazon-web-services aws-lambda amazon-dynamodb
I am trying to write data to different tables, tablename is passed through get request.
var tableName = event.tableName.toString();
When I write hardcoded tableName it works fine but when I write variable Name it throws error.
2018-11-20T21:09:31.532Z 928e237c-ed08-11e8-a312-539d290e67fc {"errorMessage":"Requested resource not found","errorType":"ResourceNotFoundException","stackTrace":["Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)","Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)","Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)","AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)","/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)","Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)","Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"]}
END RequestId: 928e237c-ed08-11e8-a312-539d290e67fc
REPORT RequestId: 928e237c-ed08-11e8-a312-539d290e67fc Duration: 124.41 ms Billed Duration: 200 ms Memory Size: 1024 MB Max Memory Used: 33 MB
Here is the code:
var params = {
RequestItems: {
tableName : [
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r1index
},
"DateandTime" :{
"S": DnT1
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x11
},
"y1_axis":{
"S": y11
},
"z1_axis":{
"S": z11
},
"x2_axis":{
"S": x21
},
"y2_axis":{
"S": y21
},
"z2_axis":{
"S": z21
},
"latitude":{
"S": lat1
},
"longitude":{
"S":lng1
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r2index
},
"DateandTime" :{
"S": DnT2
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x12
},
"y1_axis":{
"S": y12
},
"z1_axis":{
"S": z12
},
"x2_axis":{
"S": x22
},
"y2_axis":{
"S": y22
},
"z2_axis":{
"S": z22
},
"latitude":{
"S": lat2
},
"longitude":{
"S":lng2
}
}
}
},
{
PutRequest: {
"Item" : {
"indexNumber":{
"N": r3index
},
"DateandTime" :{
"S": DnT3
} ,
"roadId" :{
"N": id
},
"x1_axis":{
"S": x13
},
"y1_axis":{
"S": y13
},
"z1_axis":{
"S": z13
},
"x2_axis":{
"S": x23
},
"y2_axis":{
"S": y23
},
"z2_axis":{
"S": z23
},
"latitude":{
"S": lat3
},
"longitude":{
"S":lng3
}
}
}
}
]
}
};
javascript node.js amazon-web-services aws-lambda amazon-dynamodb
javascript node.js amazon-web-services aws-lambda amazon-dynamodb
asked Nov 20 '18 at 21:11


Faizan ShahFaizan Shah
54
54
please add information how do you concatenate string to placetableName
in final code. Also add to your codeconsole.log(JSON.stringify(event));
to check what event contains
– guzial
Nov 20 '18 at 21:54
I am passing table name from get request. And I get it in console.log(); even table is present and region is also the same.
– Faizan Shah
Nov 20 '18 at 22:09
add a comment |
please add information how do you concatenate string to placetableName
in final code. Also add to your codeconsole.log(JSON.stringify(event));
to check what event contains
– guzial
Nov 20 '18 at 21:54
I am passing table name from get request. And I get it in console.log(); even table is present and region is also the same.
– Faizan Shah
Nov 20 '18 at 22:09
please add information how do you concatenate string to place
tableName
in final code. Also add to your code console.log(JSON.stringify(event));
to check what event contains– guzial
Nov 20 '18 at 21:54
please add information how do you concatenate string to place
tableName
in final code. Also add to your code console.log(JSON.stringify(event));
to check what event contains– guzial
Nov 20 '18 at 21:54
I am passing table name from get request. And I get it in console.log(); even table is present and region is also the same.
– Faizan Shah
Nov 20 '18 at 22:09
I am passing table name from get request. And I get it in console.log(); even table is present and region is also the same.
– Faizan Shah
Nov 20 '18 at 22:09
add a comment |
1 Answer
1
active
oldest
votes
I think your json is incorrect. When you define your RequestItems object like
RequestItems: { tableName: [...] }
you actually are hard-coding the string "tableName" as the attribute, not a variable called "tableName". This is why there's no table called that.
The es6 solution is to do this:
RequestItems: { [tableName]: [...] }
The old-fashioned solution is to do this:
var RequestItems = {};
RequestItems[tableName] = [...];
See How To Set A JS object property name from a variable for reference
Edit:
For a more complete solution, try:
var params = {};
params.RequestItems = {};
params.RequestItems[tableName] = [...]
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401591%2fdynamodb-batchwriteitem-dont-put-data-to-dynamic-tablename-in-lambda-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think your json is incorrect. When you define your RequestItems object like
RequestItems: { tableName: [...] }
you actually are hard-coding the string "tableName" as the attribute, not a variable called "tableName". This is why there's no table called that.
The es6 solution is to do this:
RequestItems: { [tableName]: [...] }
The old-fashioned solution is to do this:
var RequestItems = {};
RequestItems[tableName] = [...];
See How To Set A JS object property name from a variable for reference
Edit:
For a more complete solution, try:
var params = {};
params.RequestItems = {};
params.RequestItems[tableName] = [...]
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
add a comment |
I think your json is incorrect. When you define your RequestItems object like
RequestItems: { tableName: [...] }
you actually are hard-coding the string "tableName" as the attribute, not a variable called "tableName". This is why there's no table called that.
The es6 solution is to do this:
RequestItems: { [tableName]: [...] }
The old-fashioned solution is to do this:
var RequestItems = {};
RequestItems[tableName] = [...];
See How To Set A JS object property name from a variable for reference
Edit:
For a more complete solution, try:
var params = {};
params.RequestItems = {};
params.RequestItems[tableName] = [...]
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
add a comment |
I think your json is incorrect. When you define your RequestItems object like
RequestItems: { tableName: [...] }
you actually are hard-coding the string "tableName" as the attribute, not a variable called "tableName". This is why there's no table called that.
The es6 solution is to do this:
RequestItems: { [tableName]: [...] }
The old-fashioned solution is to do this:
var RequestItems = {};
RequestItems[tableName] = [...];
See How To Set A JS object property name from a variable for reference
Edit:
For a more complete solution, try:
var params = {};
params.RequestItems = {};
params.RequestItems[tableName] = [...]
I think your json is incorrect. When you define your RequestItems object like
RequestItems: { tableName: [...] }
you actually are hard-coding the string "tableName" as the attribute, not a variable called "tableName". This is why there's no table called that.
The es6 solution is to do this:
RequestItems: { [tableName]: [...] }
The old-fashioned solution is to do this:
var RequestItems = {};
RequestItems[tableName] = [...];
See How To Set A JS object property name from a variable for reference
Edit:
For a more complete solution, try:
var params = {};
params.RequestItems = {};
params.RequestItems[tableName] = [...]
edited Nov 23 '18 at 14:02
answered Nov 21 '18 at 2:06
piisexactly3piisexactly3
516310
516310
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
add a comment |
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
THANKS FOR REPLAY, but the problem still exists
– Faizan Shah
Nov 23 '18 at 1:47
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
TypeError: Cannot set property 'unitest' of undefined at exports.handler (/var/task/index.js:181:32) where tableName='unitest';
– Faizan Shah
Nov 23 '18 at 1:48
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
I am doing it like var params = {}; var RequestItems = {}; params.RequestItems[tableName] = [ {...} ];
– Faizan Shah
Nov 23 '18 at 1:49
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
Still an issue with your json. params.RequestItems creates a new attribute for the params object (it's not using the variable you defined)
– piisexactly3
Nov 23 '18 at 13:59
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401591%2fdynamodb-batchwriteitem-dont-put-data-to-dynamic-tablename-in-lambda-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
please add information how do you concatenate string to place
tableName
in final code. Also add to your codeconsole.log(JSON.stringify(event));
to check what event contains– guzial
Nov 20 '18 at 21:54
I am passing table name from get request. And I get it in console.log(); even table is present and region is also the same.
– Faizan Shah
Nov 20 '18 at 22:09