I have the following line of code :
table.put_item( Item={'filename' : key, 'status' : {'M' : iocheckdict }})
The iocheckdict
looks like this:
{'A': 'One', 'C': 'Three', 'D': 'Four', 'B': 'Two', 'E': 'Five'}
So, when I am running the code, I get this error:
An error occurred (ValidationException) when calling the PutItem operation: One or more parameter values were invalid: Type mismatch for key status expected: S actual: M
Why am I getting this, even though I mentioned M
as the type of the data?
PS : I have 2 columns filename
and status
in my table
Attribute definitions of the table:
"AttributeDefinitions": [{"AttributeName": "filename","AttributeType": "S"},{"AttributeName": "status","AttributeType": "S"}
],
I understand that the type of status
is S, but I haven't found the map type while creating the table. All I found are string
, binary
and number
.