'Upgrade ControlM agents on EC2 instance

I need to know what strategy we should use when we try to upgrade an agent on a running ec2. In order to follow cloud standards what i did is. i created an AMI and that has got my agent installed, so any new ec2 made by that AMI is having the agent installed. But when i want to upgrade the agent. how should i go about it?

Which is the best option here:

  1. Code deploy
  2. Code pipeline
  3. Lambda

or what else should be a good approach to follow?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source