**To get records from a Dynamodb stream**

The following ``get-records`` command retrieves records using the specified Amazon DynamoDB shard iterator. ::

    aws dynamodbstreams get-records \
        --shard-iterator "arn:aws:dynamodb:us-west-1:123456789012:table/Music/stream/2019-10-22T18:02:01.576|1| "

Output::

    {
        "Records": [
            {
                "eventID": "c3b5d798eef6215d42f8137b19a88e50",
                "eventName": "INSERT",
                "eventVersion": "1.1",
                "eventSource": "aws:dynamodb",
                "awsRegion": "us-west-1",
                "dynamodb": {
                    "ApproximateCreationDateTime": 1571849028.0,
                    "Keys": {
                        "Artist": {
                            "S": "No One You Know"
                        },
                        "SongTitle": {
                            "S": "Call Me Today"
                        }
                    },
                    "NewImage": {
                        "AlbumTitle": {
                            "S": "Somewhat Famous"
                        },
                        "Artist": {
                            "S": "No One You Know"
                        },
                        "Awards": {
                            "N": "1"
                        },
                        "SongTitle": {
                            "S": "Call Me Today"
                        }
                    },
                    "SequenceNumber": "700000000013256296913",
                    "SizeBytes": 119,
                    "StreamViewType": "NEW_AND_OLD_IMAGES"
                }
            },
            {
                "eventID": "878960a6967867e2da16b27380a27328",
                "eventName": "INSERT",
                "eventVersion": "1.1",
                "eventSource": "aws:dynamodb",
                "awsRegion": "us-west-1",
                "dynamodb": {
                    "ApproximateCreationDateTime": 1571849029.0,
                    "Keys": {
                        "Artist": {
                            "S": "Acme Band"
                        },
                        "SongTitle": {
                            "S": "Happy Day"
                        }
                    },
                    "NewImage": {
                        "AlbumTitle": {
                            "S": "Songs About Life"
                        },
                        "Artist": {
                            "S": "Acme Band"
                        },
                        "Awards": {
                            "N": "10"
                        },
                        "SongTitle": {
                            "S": "Happy Day"
                        }
                    },
                    "SequenceNumber": "800000000013256297217",
                    "SizeBytes": 100,
                    "StreamViewType": "NEW_AND_OLD_IMAGES"
                }
            },
            {
                "eventID": "520fabde080e159fc3710b15ee1d4daa",
                "eventName": "MODIFY",
                "eventVersion": "1.1",
                "eventSource": "aws:dynamodb",
                "awsRegion": "us-west-1",
                "dynamodb": {
                    "ApproximateCreationDateTime": 1571849734.0,
                    "Keys": {
                        "Artist": {
                            "S": "Acme Band"
                        },
                        "SongTitle": {
                            "S": "Happy Day"
                        }
                    },
                    "NewImage": {
                        "AlbumTitle": {
                            "S": "Updated Album Title"
                        },
                        "Artist": {
                            "S": "Acme Band"
                        },
                        "Awards": {
                            "N": "10"
                        },
                        "SongTitle": {
                            "S": "Happy Day"
                        }
                    },
                    "OldImage": {
                        "AlbumTitle": {
                            "S": "Songs About Life"
                        },
                        "Artist": {
                            "S": "Acme Band"
                        },
                        "Awards": {
                            "N": "10"
                        },
                        "SongTitle": {
                            "S": "Happy Day"
                        }
                    },
                    "SequenceNumber": "900000000013256687845",
                    "SizeBytes": 170,
                    "StreamViewType": "NEW_AND_OLD_IMAGES"
                }
            }
        ],
        "NextShardIterator": "arn:aws:dynamodb:us-west-1:123456789012:table/Music/stream/2019-10-23T16:41:08.740|1| "
    }  

For more information, see `Capturing Table Activity with DynamoDB Streams <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html>`__ in the *Amazon DynamoDB Developer Guide*.
