I want to write a string set into a DynamoDB table from a Lambda function using table.Put. The best I've come up with so far is:
def WriteToDB(self):
table.put_item(Item={'RecordingID':self.recordingID,
'ANI':self.ani,
'DNS':self.dns,
'StartTime':self.startTime,
'EndTime':self.endTime,
'Duration':self.duration,
'FilePath':self.filePath,
'Direction': self.Direction,
'AgentIDs': "'SS': ['test','test4']",
'QueueIds': self.QueueIds,
'CreatedTime': str(datetime.datetime.now())
})
It's the AgentIDs field I'm concerned with. It's surely just a matter of formatting, and I'm working from here; https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.put_item, but I just can't get it. Can someone tell me what the correct formatting is?
thanks, that worked after I'd got myself untangled from all the quotation marks