question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(ecs): add a name prop to ContainerDefinition

See original GitHub issue

When creating a ContainerDefinition resource, it’s not currently possible to specify its name. It seems the current behavior is to use the object’s id as name, but that’s not documented and can lead to surprising behavior.

My suggestion is to add a new optional prop name that maps directly to CfnTaskDefinition.ContainerDefinitionProperty.Name.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MrArnoldPalmercommented, Mar 20, 2021

Sounds good to me! thanks for providing more context, always helps.

1reaction
CarlosDominguescommented, Mar 19, 2021

@MrArnoldPalmer my use case is to configure AppMeshProxyConfiguration. In my understanding it expects a container_name prop (at least in Python) that indicates explicitly in which container an envoy proxy will be instantiated.

I was getting an error after changing my ContainerDefinition id. Then I realized those two were related.

CDK discourages naming things explicitly

Sure. Another use case, though: for developers, trying to debug applications by searching the UI for id-like container names and logs isn’t a lot fun. Of course you could use pretty names for a resource id, but then you run into limitations such as id having to be unique within the scope it’s being created. I guess my point is: identifiers that are useful when looking to cloud architecture aren’t necessarily useful for those looking at UI / application.

Read more comments on GitHub >

github_iconTop Results From Across the Web

class ContainerDefinition (construct) · AWS CDK
The working directory in which to run commands inside the container. Properties. Name, Type, Description. containerDependencies, ContainerDependency [], An ...
Read more >
AWS::ECS::TaskDefinition - Amazon CloudFormation
Type: AWS::ECS::TaskDefinition Properties: ContainerDefinitions: ... The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS ...
Read more >
Registers a new task definition from the supplied family ... - Paws
The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services...
Read more >
Amazon ECS on AWS Fargate - Datadog Docs
Choose Task memory and Task CPU based on your needs. Click the Add container button to begin adding the Datadog Agent container. For...
Read more >
The container does not exist in the task definition
The container name you define in task_definition must match with the one in ecs_service's load_balancer configuration container_name.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found