S3事件通知仅发送元数据,以SQS

问题描述 投票:0回答:1

试图了解有关SQS。

我最近启用的S3事件数据的形式S3同步到SQS。当我上传文件(一些纯文本数据)至S3我只看到了元数据的SQS队列文件中,而不是实际的数据(上传到S3的文件)。

下面是从响应SQS CLI我得到。

{
"Messages": [{
    "Body": "{\"Records\":[{\"eventVersion\":\"2.1\",\"eventSource\":\"aws:s3\",\"awsRegion\":\"us-west-2\",\"eventTime\":\"2019-02-03T04:20:52.812Z\",\"eventName\":\"ObjectCreated:Put\",\"userIdentity\":{\"principalId\":\"AWS:AROAJPPH7T6UMTQNWQDV4:email@email.com\"},\"requestParameters\":{\"sourceIPAddress\":\"***.***.95.237\"},\"responseElements\":{\"x-amz-request-id\":\"D0FBEB5DD148EC84\",\"x-amz-id-2\":\"F7q+hW5hb6f02J42gT1wWDWjAp2wuQ3ojio1n2Bz/jZCS+e+6/zjkYsUfRNB59dqH61p67rPJDU=\"},\"s3\":{\"s3SchemaVersion\":\"1.0\",\"configurationId\":\"SQS-hops-mab-new-hotelids\",\"bucket\":{\"name\":\"bukcet-name\",\"ownerIdentity\":{\"principalId\":\"A3HAX2MIKOSGAO\"},\"arn\":\"arn:aws:s3:::bukcet-name\"},\"object\":{\"key\":\"prefix/data_file\",\"size\":80,\"eTag\":\"b10063d01db20998584a425f0fa77a29\",\"sequencer\":\"005C566C24C2E9A48A\"}}}]}",
    "ReceiptHandle": "AQEBGIumiawoH/pKK5deThbTsCuZ8bWlgF/p8qiL1VTrDqpkUkVxWUxlzMftEtfRzqFZKx+nyUCjuSb50Oicd7hq51LUexOro0+GTVtQsxJlEJ9RaxIk+7/Ia1Ac7ox2G4Mt1nnFBDiEsiPgwYwbQe0fAz1EFiI3QZuZtOdyPNFAIaObPJGhF591IwSA6xhIqgHYJwo5pvw/axVCd05Ex34wg/TFIN9Ha4RVUSDWFXpBmPtM/1V6Ek6HP/Ag0Ps3HKhG1KNOFUjq0mv6bGqaXI/HuxCGitj3uk0xX25y0lT+RFomWcDyKpbmfm2fue8StABrKE7sm/inc1Zbd/4qKFTNUdPqQVqIr3s55plAPDXGvNiXBx4O7FkrE1jrxHBeONMRrlYHe2/KeL0WaITYu3dxNw==",
    "MD5OfBody": "0c04939f7c38ff3f9992ef911b514ed7",
    "MessageId": "f7fcb7da-66cb-4a59-acf0-79f75e9a60ce"
}]

}

下面是在上述主体部分的元数据。

{
"Records": [{
    "eventVersion": "2.1",
    "eventSource": "aws:s3",
    "awsRegion": "us-west-2",
    "eventTime": "2019-02-04T01:00:31.166Z",
    "eventName": "ObjectCreated:Put",
    "userIdentity": {
        "principalId": "AWS:AROAJPPH7T6UMTQNWQDV4:email@****.com"
    },
    "requestParameters": {
        "sourceIPAddress": "***.***.95.237"
    },
    "responseElements": {
        "x-amz-request-id": "24703DDF194A1F7E",
        "x-amz-id-2": "wwpJeU6B3yZT7qaB7imsucsaM8y1hpFBi14POL4L1/2C1/CoBRkdHLgIOPzyy85a3RPJQFfE9Ys="
    },
    "s3": {
        "s3SchemaVersion": "1.0",
        "configurationId": "SQS-name",
        "bucket": {
            "name": "bucket-name",
            "ownerIdentity": {
                "principalId": "A3HAX2MIKOSGAO"
            },
            "arn": "arn:aws:s3:::bucket-name"
        },
        "object": {
            "key": "prefix/datafile",
            "size": 80,
            "eTag": "b10063d01db20998584a425f0fa77a29",
            "sequencer": "005C578EAF156E8A91"
        }
    }
}]

}

不会在S3事件通知的实际数据发送到SQS?我缺少的东西吗?

amazon-s3 amazon-sqs
1个回答
1
投票

是的,这是正确的SQS只会S3对象的元数据被创建/修改或基于通知事件。无论您选择的目的地类型的,S3通知结构相同的所有目的地。 S3对象可以是任何音频,视频或一些巨大的JSON文件。 SQS有limits并不能总是得到实际S3对象。

热门问题
推荐问题
最新问题