ecs.ExternalService: daemon
and placementConstraints
not implemented
#31204
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Extension of this: aws/containers-roadmap#2395
I would like to enable daemon-type scheduling for services running on External instances through ECS-Anywhere. If the
daemon
boolean option is not available, then a workaround would simply to be to do useplacementConstraints
with theDistinctInstance
option.At first, it appeared as if this was unsupported on ECS External services in AWS. However, it appears that placement constraints are already supported in AWS, but just not added to the CDK client - I believe this is the case because if I go edit an existing
ecs.ExternalService
on the console, I have the option to add placement constraints, but if I use the CDK, it is not an option and gives the following errors when I try on either the External Task Definition or External Service:I think a simple fix here is to simply add those fields on either of the
ecs.ExternalTaskDefition
orecs.ExternalService
types. Longer-term, adaemon
option might be nice, but as I understand it, this is basically just syntax sugar aroundplacementConstraints: distinctInstance()
?Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
I would expect this:
or this:
to work.
Current Behavior
Those fields are not available.
Reproduction Steps
To reproduce, try the code in the expected behavior
Possible Solution
It's already added to AWS it seems, so in the CDK we just need to add the fields
Additional Information/Context
No response
CDK CLI Version
2.130.0 (build bd6e5ee)
Framework Version
No response
Node.js Version
20
OS
Ubuntu
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: