Skip to content

Comments

chore: fleet do not play well with ELB#1

Closed
pgrange wants to merge 1 commit intomainfrom
no_fleet
Closed

chore: fleet do not play well with ELB#1
pgrange wants to merge 1 commit intomainfrom
no_fleet

Conversation

@pgrange
Copy link

@pgrange pgrange commented Oct 31, 2025

⚠️do not merge ⚠️

  • we need to figure out if we can adopt the resources and not destroy the existing EC2 instances

With ElasticLoadBalancingV2 we need to define a TargetGroup and our instances must be part of this TargetGroup.

When we create our instances with EC2Fleet, we have no way to declare that we want them to be attached to some TargetGroup. The only way to attach these instances would be to have some lambda reacting to their creation and dynamically attaching them to some TargetGroup... that does not look like something we want to do and maintain.

Since we only want two instances, let's switch to a more static approach that can then be integrated with TargetGroup.

See:

With ElasticLoadBalancingV2 we need to define a TargetGroup
and our instances must be part of this TargetGroup.

When we create our instances with EC2Fleet, we have no way
to declare that we want them to be attached to some TargetGroup.
The only way to attach these instances would be to have some
lambda reacting to their creation and dynamically attaching
them to some TargetGroup... that does not look like something
we want to do and maintain.

Since we only want two instances, let's switch to a more
static approach that can then be integrated with TargetGroup.

See:
* https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticloadbalancingv2-targetgroup.html
* https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ec2-ec2fleet.html
@pgrange pgrange closed this Oct 31, 2025
@pgrange
Copy link
Author

pgrange commented Oct 31, 2025

Closing as we're really not confortable with that adoption stuff in cloud formation and don't want to accidentally kill our beloved EC2 instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant