title: How do I access the data from an AWS Kinesis Data Stream event?
body: <p>I'm working on a Python lambda that consumes an <a href="https://aws.amazon.com/kinesis/data-streams/" rel="nofollow noreferrer">AWS Kinesis Data Stream</a>. But I'm struggling to understand the shape of kinesis record events. For example:</p>
  
  <pre><code>{
      "Records": [
          {
              "kinesis": {
                  "kinesisSchemaVersion": "1.0",
                  "partitionKey": "1",
                  "sequenceNumber": "49590338271490256608559692538361571095921575989136588898",
                  "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==",
                  "approximateArrivalTimestamp": 1545084650.987
              },
              "eventSource": "aws:kinesis",
              "eventVersion": "1.0",
              "eventID": "shardId-000000000006:49590338271490256608559692538361571095921575989136588898",
              "eventName": "aws:kinesis:record",
              "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role",
              "awsRegion": "us-east-2",
              "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream"
          },
          {
              "kinesis": {
                  "kinesisSchemaVersion": "1.0",
                  "partitionKey": "1",
                  "sequenceNumber": "49590338271490256608559692540925702759324208523137515618",
                  "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=",
                  "approximateArrivalTimestamp": 1545084711.166
              },
              "eventSource": "aws:kinesis",
              "eventVersion": "1.0",
              "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618",
              "eventName": "aws:kinesis:record",
              "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role",
              "awsRegion": "us-east-2",
              "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream"
          }
      ]
  }
  </code></pre>
  
  <p><em>Source:</em> <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html" rel="nofollow noreferrer">Using AWS Lambda with Amazon Kinesis</a></p>
  
  <p>Where is the data I originally put on the kinesis stream represented in this object? And how do I access this data?</p>