# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import boto3 import os table_name = os.environ.get('tableName') dynamodb = boto3.resource('dynamodb') table = dynamodb.Table(table_name) def handler(event, context): product = event['body'] table.put_item(Item=product) return None