SCOM Agents on AWS EC2 instances

Hello, Does anyone have experience monitoring ec2 instances with scom. Our developers want to use ‘infrastructure as a code’. They want to place the scom agent in the image of a server for this purpose. Every server that is deployed would then appear in scom and be monitored. We want to avoid this. They say that pushing the agent from the scom management group is not possible when using ‘Infrastructure as a code’. The agent would disappear upon an update to the server. Does anyone have a solution for this? Kind regards, Luc.