Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstanceType not updating after changing #307

Open
qmitchell-aa opened this issue Mar 10, 2024 · 0 comments
Open

InstanceType not updating after changing #307

qmitchell-aa opened this issue Mar 10, 2024 · 0 comments

Comments

@qmitchell-aa
Copy link

Hi,

Wanted to highlight this situation to be potentially helpful to others , if they find themselves in the same situation as me.

My usage of fck-nat is below. If I change the instanceType, then my instance does not update / stays at the old instance type.

return new FckNatInstanceProvider({
      eipPool: [eip.attrAllocationId],
      instanceType,
      machineImage: new ec2.GenericLinuxImage(image),
      enableSsm: false,
    });

I think I'm in a similar situation as to this:
https://www.reddit.com/r/aws/comments/136xaiz/ecs_container_instance_not_updating_when_launch/

Due to the launchtemplate changing and not actually the instance definition, therefore my currently running instance isn't changed.

I wasn't familiar with launch templates & ASGs ... this issue made me learn them a little.

The fix

  1. Go to the ASG, click it's launch template. Set the next version as the default version.
  2. Go to the ASG, click Instance Refresh tab. Start a refresh with "Launch before terminating". I kept all default settings, but gave the instance 10 seconds for instance warm up.
  3. Wait a bit, new instance will start, warmup, then old instance will go away.

To the maintainer, maybe close this issue as it is by CDK design to work like this. Just quirky 'by design' place we've found ourselves in.

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

No branches or pull requests

1 participant