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 ...
What is the current behavior?
If the current behavior is a :beetle:bug:beetle:: 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:
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)
This issue looks to be fixed in 1.4.
Thanks @joezhou888, it was indeed fixed in the latest version. I went through the change log again and can't tell what fixed it.
@NGL321 Do you want me to make a PR to add this as an integration test, to prevent a regression?
@joezhou888 thanks for the response! @nmussy, sorry for the delay, do you happen to know what the cloud formation difference is? If you could add a unit test and create a PR, that would be awesome!
No problem, and no I haven't investigated it yet. I'll look into it over the weekend. I'll close this issue with the test PR
@nmussy Did you ever get a chance to get back to this?
@SomayaB Thanks for the reminder, I'll check it out
Most helpful comment
@SomayaB Thanks for the reminder, I'll check it out