I am trying to create a new Item in my table and every time I run the following code:
from __future__ import print_function
from decimal import *
import boto3
import json
def my_handler(event, context):
marker = event['m']
latitude = Decimal(event['lat'])
longitude = Decimal(event['lon'])
tableminfo = 'minfo'
client = boto3.client('dynamodb')
client.put_item(
TableName = tableminfo, Item = {
'marker':{'N' : marker},
'latitude':{'N' : latitude},
'longitude':{'N' : longitude},
}
)
success = "Success"
return {'success' : success}
with the following test parameters in Lambda
{
"m": 1,
"lat": 52.489505,
"lon": 13.389687
}
I receive an error on the following lines: 17, "my_handler", "'longitude':{'N' : longitude},"