Saving changes to an EC2 instance without having t

2019-08-03 18:23发布

问题:

I wanted to make sure there is no better way to do what I am doing without having to register a new AMI each time I make a change to my instance.

My current workflow is the following:

  1. Create an AMI with my default settings and all my cronjobs (lets call it A1)
  2. Create a cronjob on another instance wich buys a spot request for instance A1 every X hours
  3. A1 runs its jobs and automatically shutdown itself
  4. Terminate the spot request for the A1 instance
  5. Edit the files in A1 if there are changes that need to be done

The problem I have is that many times I need to make changes to my A1 instance and then I have to edit my other instance in order to make changes to the file which buys the spot request to reflect the new AMI. As this is done with tons of instances it gets a little messy.

Is it possible to only change the "content" of instances without having to register a new instance ID? In that way spot requests can keep calling the same ID?

Any tip much appreciated. Thanks!