import boto3
from boto3.dynamodb.conditions import Key
import simplejson as json


def lambda_handler(event, context):
    # TODO implement
    dynamodb = boto3.resource('dynamodb')
    productsTable = dynamodb.Table('ProductsData')
    productID = event["pathParameters"]["id"]
    productResponse = productsTable.query(
        KeyConditionExpression=Key('asin').eq(productID)
    )

    reviewResponse = productsTable.scan(FilterExpression=Key('asin').eq(productID))

    productInfo = {
        "productData": productResponse,
        "reviewData": reviewResponse
    }

    return {
        'statusCode': 200,
        'headers': {
            'Access-Control-Allow-Origin': '*',
            'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
            'Access-Control-Allow-Credentials': True,
            'Content-Type': 'application/json'
        },
        'body': json.dumps(productInfo),
        "isBase64Encoded": False
    }
8e915def64a97ab1edaa3709eb27c958d350c3c0
<mask token>

<mask token>


def lambda_handler(event, context):
    dynamodb = boto3.resource('dynamodb')
    productsTable = dynamodb.Table('ProductsData')
    productID = event['pathParameters']['id']
    productResponse = productsTable.query(KeyConditionExpression=Key('asin'
        ).eq(productID))
    reviewResponse = productsTable.scan(FilterExpression=Key('asin').eq(
        productID))
    productInfo = {'productData': productResponse, 'reviewData': reviewResponse
        }
    return {'statusCode': 200, 'headers': {'Access-Control-Allow-Origin':
        '*', 'Access-Control-Allow-Headers':
        'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
        'Access-Control-Allow-Credentials': True, 'Content-Type':
        'application/json'}, 'body': json.dumps(productInfo),
        'isBase64Encoded': False}

import boto3
from boto3.dynamodb.conditions import Key
import simplejson as json


def lambda_handler(event, context):
    dynamodb = boto3.resource('dynamodb')
    productsTable = dynamodb.Table('ProductsData')
    productID = event['pathParameters']['id']
    productResponse = productsTable.query(KeyConditionExpression=Key('asin'
        ).eq(productID))
    reviewResponse = productsTable.scan(FilterExpression=Key('asin').eq(
        productID))
    productInfo = {'productData': productResponse, 'reviewData': reviewResponse
        }
    return {'statusCode': 200, 'headers': {'Access-Control-Allow-Origin':
        '*', 'Access-Control-Allow-Headers':
        'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
        'Access-Control-Allow-Credentials': True, 'Content-Type':
        'application/json'}, 'body': json.dumps(productInfo),
        'isBase64Encoded': False}

import boto3
from boto3.dynamodb.conditions import Key
import simplejson as json


def lambda_handler(event, context):
    # TODO implement
    dynamodb = boto3.resource('dynamodb')
    productsTable = dynamodb.Table('ProductsData')
    productID = event["pathParameters"]["id"]
    productResponse = productsTable.query(
        KeyConditionExpression=Key('asin').eq(productID)
    )

    reviewResponse = productsTable.scan(FilterExpression=Key('asin').eq(productID))

    productInfo = {
        "productData": productResponse,
        "reviewData": reviewResponse
    }

    return {
        'statusCode': 200,
        'headers': {
            'Access-Control-Allow-Origin': '*',
            'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
            'Access-Control-Allow-Credentials': True,
            'Content-Type': 'application/json'
        },
        'body': json.dumps(productInfo),
        "isBase64Encoded": False
    }