<reponame>Mythridor/aws-scripting
import boto3
from boto3.dynamodb.conditions import Key


def lambda_handler(event, context):
    dynamodb = boto3.resource('dynamodb')
    table = dynamodb.Table('<DBName>')
    result = table.query(
        ProjectionExpression='file_key',
        KeyConditionExpression=Key('subject').eq(event['subject'])
    )
    return result['Items']

import boto3
from boto3.dynamodb.conditions import Key


def lambda_handler(event, context):
    dynamodb = boto3.resource('dynamodb')
    table = dynamodb.Table('<DBName>')
    result = table.query(
        ProjectionExpression='file_key',
        KeyConditionExpression=Key('subject').eq(event['subject'])
    )
    return result['Items']