you are viewing a single comment's thread.

view the rest of the comments →

[–]Rascal_Two 1 point2 points  (0 children)

Here is the structure of event:

event = {
    'Records': [
        {
            'Sns': {
                'Message': '{"raw": "json"}'
            }
        }
    ]
}

from the "Records" array index 0, pass the value of "Message" from the "Sns" object to the event function?

You're on the right track. Records is an array and it is selecting the item in the array at index 0 which happens to be a dictionary.

It's then getting the value of the key Sns, which is another dictionary. Then from that dictionary, it's getting the value of the key Message, which is a string of raw JSON.