Step Functions: distributed Map with an S3 ItemReader fails its own GetObject (S3.MethodNotAllowed)
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
- Create a bucket and put
[1,2,3]atmanifest.json(with boto3 against the emulator) — a directget_objecton that key returnsb'[1,2,3]'. - 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, errorS3.MethodNotAllowed, causeGetObject 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).
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.