Skip to content

Fix env var passing in RunAltTextGenerationTask#46

Open
so9000 wants to merge 1 commit into
ASUCICREPO:mainfrom
so9000:bugfix/alt-text-task-env-vars
Open

Fix env var passing in RunAltTextGenerationTask#46
so9000 wants to merge 1 commit into
ASUCICREPO:mainfrom
so9000:bugfix/alt-text-task-env-vars

Conversation

@so9000
Copy link
Copy Markdown

@so9000 so9000 commented May 26, 2026

S3_BUCKET_NAME and S3_FILE_KEY were being resolved by indexing into the ECS ContainerOverrides array from the previous task's output. This can cause intermittent failures (~50%) when AWS GuardDuty Runtime Monitoring, which may run as a security requirement in production environments, injects a sidecar container into the ContainerOverrides array at launch time, making the array order unpredictable.

Fixed by:

  • Adding result_path='$.ecsResult' to RunAdobeAutotagTask to preserve the original Map iterator input for downstream states
  • Updating RunAltTextGenerationTask to reference $.s3_bucket and $.s3_key directly from the Map iterator input instead of the ECS response array

S3_BUCKET_NAME and S3_FILE_KEY were being resolved by indexing into the
ECS ContainerOverrides array from the previous task's output. This caused
intermittent failures (~50%) because AWS GuardDuty Runtime Monitoring,
running as a security requirement, injects a sidecar container into the
ContainerOverrides array at launch time, making the array order
unpredictable.

Fixed by:
- Adding result_path='$.ecsResult' to RunAdobeAutotagTask to preserve
  the original Map iterator input for downstream states
- Updating RunAltTextGenerationTask to reference $.s3_bucket and $.s3_key
  directly from the Map iterator input instead of the ECS response array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant