Question: @geekman2 ASG will not replace if just the launch config updated … you must be changing something else pretty radical. And just to confirm: the _name_ of the ASG actually changed? @geekman2 Are you able to share the output from a CFN update where the ASG was replaced? I do this all the time, it works great from CFN.

Asked By
Asked At
2018-04-25 18:14:43

Found 15 possible answers.

User Answered At Possible Answer
geekman2 2018-04-25 18:18:35 @geekman2 uploaded a file: Events
rlister 2018-04-25 18:19:56 :eyes:
geekman2 2018-04-25 18:20:26 Yeah sorry for the wall of text, CF isn't exactly concise
rlister 2018-04-25 18:20:28 ECSAutoScalingGroup Requested update requires the creation of a new physical resource; hence creating one. That has never happened in my experience just from launch config updating.
digitalsanctum 2018-04-25 18:21:17 Hi, does anyone have tips on how to determine which aws services are attributed to an IP? I’m aware of the ip ranges that aws publishes but looking for more detail. For example, given an IP is it DynamoDB, SQS, etc.
rlister 2018-04-25 18:21:18 @geekman2 Do you have any update policy right now?
geekman2 2018-04-25 18:21:47
I set it to true because I wasn't able to figure out what "false" would do
        WillReplace: 'true'
rlister 2018-04-25 18:22:10 @geekman2 As you can see in the docs, LaunchConfigurationName is a no interruption setting:
      PauseTime: :PT10M,
      WaitOnResourceSignals: true,
      MaxBatchSize: 32,
      MinInstancesInService: 1,
    AutoScalingRollingUpdate: {
{ @geekman2 for reference, here is an example of what I set:
josh502 2018-04-25 18:23:26 It can happen if the name of the asg is based on the name of the LC or some other property of the LC
rlister 2018-04-25 18:23:59 good point … @geekman2 do you set the ASG name in the template, or let CFN set it?
josh502 2018-04-25 18:24:18 this is actually my strategy for deploying right now since it cycles the instances with terraform which is fine for me since we're small
rlister 2018-04-25 18:25:15 In CFN it is generally a _really_ good idea to let CFN name things. It prevents inability to replace on a lot of resources. As a nice psychological side-effect, it discourages “pet” syndrome :slightly_smiling_face:
josh502 2018-04-25 18:25:15 in terraform you could in theory grab the old size with a data source
geekman2 2018-04-25 18:25:50 @rlister It looks like I'm letting CFN name it
rlister 2018-04-25 18:26:07 That’s good. Without it, the ASG should remain, and just your instances will be replaced. ^^^ @geekman2 yep, that WillReplace is your problem. Try just removing it. Specifies whether an Auto Scaling group and the instances it contains are replaced during an update. During replacement, AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation can roll back to the old Auto Scaling group and delete the new Auto Scaling group.

Related Questions