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

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
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠