title: How do I associate an Elastic IP Address to a Windows Server in an AutoScale Group Automatically?
body: <p>I am trying to find an example of way to reliably associate the same Elastic IP Address to a Windows Server that is part of a AutoScale Group.  Essentially the goal is to deal with situations where the server gets terminated and replaced via AutoScale and maintain the same Public IP (required for a remote provided service).</p>
  
  <p>The AutoScale Group is configured to only allow 1 server max and 1 server minimum for an automatic recovery scenario.  Server is in a VPC and is essentially a worker for a remote web queue that requires the static addressing.</p>
  
  <p>I'd like to also leverage IAM roles so that I don't have to embed AWS credentials in a UserData provided script.  Currently I'm looking for an example powershell script but if someone knows a better way, I'm open to suggestions of course.  I've seen some older examples out there but they are dated and are using embedded AWS credentials which I'd like to avoid.</p>