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 Antwort
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
EXPERTE
Matt-B
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen