Convert python to go its important

import json
import boto3

def lambda_handler(event,context):
#TODO implement
client_dynamo=boto3.resource(‘dynamodb’)
table=client_dynamo.Table(‘testing’)
try:
response=table.put_item(Item=event)
return “Done”
except:
raise

I’m not at all familiar with Python code so I’m not sure what this is doing. It looks like you’re loading a DynamoDB and attempting to insert something into a table. Check out the docs for the go SDK as a good starting point:

Also head over specifically to their DynamoDB examples:

There is an example that shows how to use PutItem specifically:

I believe you could modify that example code and accomplish what your code snippet above does.

2 Likes

Dean pointed you to examples for DynamoDB. For the lambda function see:

2 Likes