fakecloud icon indicating copy to clipboard operation
fakecloud copied to clipboard

Step Functions: distributed Map with an S3 ItemReader fails its own GetObject (S3.MethodNotAllowed)

Open fivejjs opened this issue 1 month ago • 1 comments

Summary

A distributed Map whose ItemReader reads an S3 object fails its own read: the execution ends FAILED with S3.MethodNotAllowed and cause GetObject failed: The specified method is not allowed against this resource. Direct boto3.get_object against the same emulator, bucket and key succeeds, so the store is healthy and the failure is in the Step Functions S3 task integration.

Observed on fakecloud 0.51.0 (linux-amd64 release binary, SHA-256 verified).

Reproduction

  1. Create a bucket and put [1,2,3] at manifest.json (with boto3 against the emulator) — a direct get_object on that key returns b'[1,2,3]'.
  2. Create and start this state machine:
{"StartAt":"M","States":{"M":{
  "Type":"Map",
  "ItemProcessor":{"ProcessorConfig":{"Mode":"DISTRIBUTED"},
                   "StartAt":"P","States":{"P":{"Type":"Pass","End":true}}},
  "ItemReader":{"Resource":"arn:aws:states:::s3:getObject",
                "Parameters":{"Bucket":"<bucket>","Key":"manifest.json"}},
  "MaxConcurrency":2,"End":true}}}
  • Expected: the map reads the manifest and iterates.
  • Actual: FAILED, error S3.MethodNotAllowed, cause GetObject failed: The specified method is not allowed against this resource.

The same failure occurs with and without ItemBatcher, and for a plain (non-batched) distributed Map.

Impact

Blocks S3-backed Distributed Map, which is how large fan-outs are normally driven (our PDF pipeline pages through an S3 manifest).

fivejjs avatar Nov 04 '26 12:11 fivejjs

Fixed in #2783, which just merged. The Step Functions task integrations now follow the recorded AWS behavior, including the validation AWS applies: a lowercase stateMachineArn parameter and a Distributed Map ItemReader without ReaderConfig where AWS requires one are now refused the same way AWS refuses them. It ships in the next release. Thanks for the report.

vieiralucas avatar Nov 10 '26 09:11 vieiralucas