title: How to retrieve multiple items from Dynamo DB using AWS lambda
body: <p>How to get multiple items from DB. the below code throws me an error as it fetches only one item. I am retrieving the items based on email value.</p>
  
  <pre><code>import json
  import os
  import boto3
  import decimalencoder
  
  dynamodb = boto3.resource('dynamodb')
  
  
  def get(event, context):
      table = dynamodb.Table(os.environ['DYNAMODB_TABLE'])
  
      # fetch a person from the database
      result = table.get_item(
          Key={
              'email': event['pathParameters']['email']
          }
      )
  
      # create a response
      response = {
          "statusCode": 200,
          "body": json.dumps(result['Item'], cls=decimalencoder.DecimalEncoder),
          "headers": {
              "Access-Control-Allow-Origin": "*",
              "Access-Control-Allow-Credentials": "true"
          }
      }
  
      return response
  </code></pre>