Skip to content

Instantly share code, notes, and snippets.

@djg07
Created January 18, 2020 22:19
Show Gist options
  • Save djg07/d2eb0da3432351992f26e5e1e7842599 to your computer and use it in GitHub Desktop.
Save djg07/d2eb0da3432351992f26e5e1e7842599 to your computer and use it in GitHub Desktop.
import boto3
def lambda_handler(event, context):
client = boto3.resource('dynamodb')
table = client.Table('YOUR TABLE NAME')
# S, N, M, L, B, SS, NS
input = {'TransactionId': '31', 'State': 'PENDING',
'RelatedTransactions': [32, 33, 34],
'CustomerDetails': { 'Name': 'John Doe', 'AccountBalance': 50}}
response = table.put_item(Item=input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment