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 Risposta
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
ESPERTO
Matt-B
con risposta un mese fa
profile picture
ESPERTO
verificato un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande