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, AutoScaling: public clusters not being registered

See original GitHub issue

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.

  • I’m submitting a …

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce I would like to deploy the following public ECS cluster, with an IP address associated with the instances:

const vpc = new Vpc(this, "vpc", {
  cidr: "10.0.0.0/16",
  natGateways: 0,
  subnetConfiguration: [
    { cidrMask: 24, name: "ingress", subnetType: SubnetType.PUBLIC }
  ]
});

const cluster = new Cluster(this, "cluster", { vpc });

const scalingGroup = cluster.addCapacity("scalingGroup", {
  desiredCapacity: 1,
  instanceType,
  spotPrice,
  associatePublicIpAddress: true,
  machineImage: EcsOptimizedImage.amazonLinux2(),
  vpcSubnets: {
    onePerAz: true,
    subnetType: SubnetType.PUBLIC
  },
});

The stack is deployed and I have an instance started in my ASG. However, no container instances are associated to my ECS cluster. The problem disappears when I switch a classic public/private VPC with a NAT Gateway.

I haven’t pinpointed where the issue is, whether the CloudFormation that is being generated in invalid, or if what I want is unavailable.

  • What is the expected behavior (or behavior of feature suggested)? Fix that behavior if it is supported by AWS, otherwise prevent setting associatePublicIpAddress in ECS clusters.

  • What is the motivation / use case for changing the behavior or adding this feature? Fix this use case, or clarify it’s impossibility

  • Please tell us about your environment:

    • CDK CLI Version: 1.3.0
    • Module Version: 1.3.0
    • OS: all
    • Language: all
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
nmussycommented, Oct 18, 2019

@SomayaB Thanks for the reminder, I’ll check it out

0reactions
SomayaBcommented, Oct 17, 2019

@nmussy Did you ever get a chance to get back to this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot why your ECS or EC2 instance can't join the ...
You get this error when the ECS agent can't register the EC2 container instance with the ECS cluster because the EC2 instance is...
Read more >
ecs instances generated via Auto Scaling group not ...
Your EC2 instances just don't have enough permissions to register with ECS cluster: Important. If you do not launch your container instance ...
Read more >
Why can't my ECS service register available EC2 instances ...
I'm new to ECS, but as soon as I remove the public IP from the launch config, the ECS EC2 instances no longer...
Read more >
Why can't my ECS service register available EC2 ... - Intellipaat
In my EC2 auto-scaling launch configuration, if I leave the user data input completely empty, the instances are created with an ECS_CLUSTER value...
Read more >
class ECS. Client - Boto3 Docs 1.26.34 documentation
Capacity providers are associated with an Amazon ECS cluster and are used in ... the Amazon EC2 instances in your Auto Scaling group...
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