Skip to content
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

aws_stepfunctions_tasks.EcsRunTask: Step Function Task cannot read containerName #27848

Closed
rupe120 opened this issue Nov 6, 2023 · 2 comments
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@rupe120
Copy link

rupe120 commented Nov 6, 2023

Describe the bug

Example project: https://github.com/rupe120/aws-cdk-stepfuction-ecsruntask-example

When I try to synth an EcsRunTask I get the error:

TypeError: Cannot read properties of undefined (reading 'containerName')
    at new EcsRunTask (C:\temp\cdk\stepfunction-ecs\node_modules\aws-cdk-lib\aws-stepfunctions-tasks\lib\ecs\run-task.js:1:4851)
    at new StepfunctionEcsStack (C:\temp\cdk\stepfunction-ecs\lib\stepfunction-ecs-stack.ts:40:25)
    at Object.<anonymous> (C:\temp\cdk\stepfunction-ecs\bin\stepfunction-ecs.ts:7:1)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module.m._compile (C:\temp\cdk\stepfunction-ecs\node_modules\ts-node\src\index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Object.require.extensions.<computed> [as .ts] (C:\temp\cdk\stepfunction-ecs\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Function.Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

Expected Behavior

A synth'd template

Current Behavior

Error reading task definition container name.

Reproduction Steps

Clone: https://github.com/rupe120/aws-cdk-stepfuction-ecsruntask-example
Run: npx cdk synth -q

Possible Solution

?

Additional Information/Context

No response

CDK CLI Version

2.102.0 (build 2abc59a)

Framework Version

2.102.0

Node.js Version

v18.16.1

OS

Microsoft Windows 11 Enterprise (10.0.22621 Build 22621)

Language

TypeScript

Language Version

TypeScript 5.2.2

Other information

No response

@rupe120 rupe120 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 6, 2023
@rupe120
Copy link
Author

rupe120 commented Nov 6, 2023

My error was in adding the as to the containerOverride thinking it would behave the same way it does in C#. The equivalent in TypeScript is actually satisfies.

@rupe120 rupe120 closed this as completed Nov 6, 2023
Copy link

github-actions bot commented Nov 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant