Created
January 18, 2020 22:19
-
-
Save djg07/d2eb0da3432351992f26e5e1e7842599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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