Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Conversation

@mohsen0
Copy link

@mohsen0 mohsen0 commented Jul 2, 2021

The payload for SQS events are like this

{
    "Records": [
        {
            "messageId": "daaa4229-8175-4edb-aea0-8ba3c3a4249a",
            "receiptHandle": "AQEBmagEXrwc3+/DcSYyMYZeRqDJJa3sg3mi3QqM4iHr1FKDlYBlyXm92xgFRvJgltNcqOnBGK66fU/b7vzIn6V6QBqKcSYz49efpHJFJdvO2ldnlgO4cONWvsc0VAhz4UGZmAzBc2ud2SK4+bFxijbB2qEHzu47WxTmTKI4UL0Bea1cjvY2c0B2sueF7JZ/UHdw5PNi31su2wY21u+58whWkZIIIAX7swTF9mIMNPlgDz/Q2alrPLYeOyuEXxo7ff3KDQO2YZER5lo9DaJtjSsZx9UM76txXdtXQoiEO9OK7aET4IE5cnmfCSrd+TKVIgyQDZe+kBs8nef5PeXn0T/dkxCEKsfJ+n7CkcNPXMG/MOu0wLWRE0xzinUKBuZVMV9w6fWkZxXiW/I/KpPcTkowuQ==",
            "body": "{\"Records\":[{\"eventVersion\":\"2.1\",\"eventSource\":\"aws:s3\",\"awsRegion\":\"eu-west-1\",\"eventTime\":\"2021-07-01T09:42:22.124Z\",\"eventName\":\"ObjectCreated:Put\",\"userIdentity\":qudini{\"principalId\":\"AWS:THISISMOHSENTHISISMO:qudini-bucket\"},\"requestParameters\":{\"sourceIPAddress\":\"1.2.3.4\"},\"responseElements\":{\"x-amz-request-id\":\"E266TW2DN5ZGM1D2\",\"x-amz-id-2\":\"1U6GNyBo6R97mrmd33+Jc0CrlWwYa452IiLZZGETk7UnqoWOOge44fsGOFLezmcN3nkkcoI3OvQqM8a8VphwqaMLyQxRs3If\"},\"s3\":{\"s3SchemaVersion\":\"1.0\",\"configurationId\":\"lambda-queue\",\"bucket\":{\"name\":\"storage\",\"ownerIdentity\":{\"principalId\":\"A3I8T8834FSV89\"},\"arn\":\"arn:aws:s3:::qudini-storage\"},\"object\":{\"key\":\"1.png\",\"size\":15871,\"eTag\":\"2898bdd843d1f4bbefea2b9a7d1af46d\",\"sequencer\":\"0060DD8E05E893D7B55\"}}}]}",
            "attributes": {
                "ApproximateReceiveCount": "2",
                "SentTimestamp": "1625132551566",
                "SenderId": "AIDAJQOC3S555Y5PEMBNW",
                "ApproximateFirstReceiveTimestamp": "1625132551569"
            },
            "messageAttributes": {},
            "md5OfBody": "a3a990426845701d9ce81dac2689e047",
            "eventSource": "aws:sqs",
            "eventSourceARN": "arn:aws:sqs:eu-west-1:123456790123:qudini-bucket-bucket-queue",
            "awsRegion": "eu-west-1"
        }
    ]
}
{
  "Records": [{
    "eventVersion": "2.1",
    "eventSource": "aws:s3",
    "awsRegion": "eu-west-1",
    "eventTime": "2021-07-01T09:42:22.124Z",
    "eventName": "ObjectCreated:Put",
    "userIdentity": {
      "principalId": "AWS:THISISMOHSENTHISISMO:qudini-bucket"
    },
    "requestParameters": {
      "sourceIPAddress": "1.2.3.4"
    },
    "responseElements": {
      "x-amz-request-id": "E266TW2DN5ZGM1D2",
      "x-amz-id-2": "1U6GNyBo6R97mrmd33+Jc0CrlWwYa2ITH2IiLZZGETk7UnqoWOOgefsGOFLezmcN3nkkcoI3OvQqM8a8VphwqaMLyQxRs3If"
    },
    "s3": {
      "s3SchemaVersion": "1.0",
      "configurationId": "lambda-queue",
      "bucket": {
        "name": "storage",
        "ownerIdentity": {
          "principalId": "A3I8T88343434V89"
        },
        "arn": "arn:aws:s3:::qudini-storage"
      },
      "object": {
        "key": "1.png",
        "size": 15871,
        "eTag": "2898bdd843d1f4bbefea2b9a7d1af46d",
        "sequencer": "0060DD8E05E93D7B55"
      }
    }
  }]
}

@CLAassistant
Copy link

CLAassistant commented Jul 2, 2021

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants