-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(stepfunctions-tasks): EcsRunTask containerOverrides throws if container name doesn't match construct ID #15171
Comments
Workaround before a fix can be made: set the construct ID and the container name to be the same value:
|
@Cruaier please feel free to assign me to a fix PR if you happen to work on one. The proper solution is probably to just expose |
…Container to check for container in TaskDefinition
|
…tainer name doesn't match construct ID (aws#15190) EcsRunTask, container override is now using using method `findContainer` to check for container in TaskDefinition fixes aws#15171 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I ran into an issue while updating CDK from 1.77.0 to1.109.0. I create a step function which utilizes ECS tasks (Fargate) to run a long-running task. It uses
EcsRunTask
from the@aws-cdk/aws-stepfunctions-tasks
library.Reproduction Steps
What did you expect to happen?
No error, since the container definition defined in the override is directly returned from the call to
TaskDefinition.addContainer
, implying that the container does in fact exist in the task definition.What actually happened?
Environment
Other
Error is coming from the code in
cdk\node_modules\@aws-cdk\aws-stepfunctions-tasks\lib\ecs\run-task.js
line 141 were it takes the name of the container (as defined in the overriding option) and looks for it (as a key) in the task definition (with the functiontryFindChild
:This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: