Put Items using Json File in AWS DynamoDB using AWS CLI

Viewed 10110

While putting below JSON in dynamo DB using AWS CLI with below command:

aws dynamodb put-item --table-name ScreenList --item file://tableName.json

I am getting Parameter validation failed Exception.I have gone rigorously through AWS docs but failed to find example to insert a complicated json.Every small help is welcome.

The updated Json :

{
  "itemName": {
    "S": "SCREEN_LIST"
  },
  "productName": {
    "S": "P2P_MOBITEL"
  },
  "screenList": {
    "L": [
      {
        "menu": {
          "L": [
            {
              "M": {
                "menuId": {
                  "N": "1"
                },
                "menuText": {
                  "S": "ENG_HEADING"
                },
                "menuType": {
                  "S": "Dynamic"
                }
              }
            }
          ]
        },
        "M": {
          "screenFooter": {
            "S": "F_LANGUAGE_CHANGE"
          },
          "screenHeader": {
            "S": "H_LANGUAGE_CHANGE"
          },
          "screenId": {
            "S": "LANGUAGE_CHANGE"
          },
          "screenType": {
            "S": ""
          }
        }
      }
    ]
  }
}
1 Answers
Related