How do I provide multiple string values to MatchAnyPrefix when creating S3 Batch Operation job?

0

I'm using the the AWS CLI (v2.15.37) with command aws s3control create-job and the following argument:

--manifest-generator '{
  "S3JobManifestGenerator": {
    "SourceBucket": "arn:aws:s3:::example-bucket1",
    "EnableManifestOutput": true,
    "ManifestOutputLocation": {
      "Bucket": "arn:aws:s3:::example-bucket2",
      "ManifestPrefix": "manifests",
      "ManifestFormat": "S3InventoryReport_CSV_20211130"
    },
    "Filter": {
      "ObjectSizeGreaterThanBytes": 131072,
      "KeyNameConstraint": {
        "MatchAnyPrefix": [
          "prefix1",
          "prefix2",
          "prefix3"
        ]
      },
      "MatchAnyStorageClass": [
        "STANDARD"
      ]
    }
  }
}'

This only works if I remove prefix2 and prefix3 from the MatchAnyPrefix parameter but the documentation (see screenshot) led me to believe that I could have 1024 prefixes. How do I provide multiple string values to MatchAnyPrefix when creating S3 Batch Operation job?

Enter image description here

James
已提问 1 个月前279 查看次数
1 回答
1

Hi There

As of right now, only one prefix is supported. The max length of 1024 refers to the length of the prefix string. The suggested workaround would be to create a separate job for each prefix.

profile pictureAWS
专家
Matt-B
已回答 1 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容