Howto install AWS CodeDeploy on EC2 Windows instance by using CloudInit

  1. Create user-data.txt file
    ————–

    <powershell>
    New-Item -ItemType Directory -Force -Path c:\temp
    Read-S3Object -BucketName aws-codedeploy-us-east-1/latest -Key codedeploy-agent.msi -File c:\temp\codedeploy-agent.msi
    start c:\temp\codedeploy-agent.msi '/qn /l*v c:\temp\host-agent-install-log.txt'
    </powershell>
    

    ————–

  2. Go to AWS EC2 console and select Windows image (e.g. Windows_Server-2012-R2_RTM-English-64Bit-Base-2014.10.15 (ami-ba13abd2))
  3. Click Launch/Spot Request
  4. Provide user data as user-data.txt file
  5. Now you will get Windows instance with AWS CodeDeploy installed. Enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s