This small video explains how to put an item in the DynamoDB table using AWS Lambda with python.
Python Code is provided below
```
import boto3
import json
def lambda_handler(event, context):
dynamodb = boto3.resource('dynamodb', region_name='us-east-2')
table = dynamodb.Table('Student')
id1=event["Id"]
name=event["Name"]
response=table.put_item(Item={"id":id1,"name":name})
return response
```
and sample JSON input
{
"Id": "100",
"Name": "John"
}
Create Table in DynamoDB
Create AWS lambda function with python 3.8
Put Item in DynamoDB Table
Update the IAM Role accordingly
Test.
Happy Learning
#AWSLambda #Python #DynamoDB
Sur cette page du site, vous pouvez voir la vidéo en ligne How to put an item in DynamoDB table using AWS Lambda with python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur smashplus 20 mai 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,169 fois et il a aimé 23 téléspectateurs. Bon visionnage!