Search code examples
amazon-web-servicesazureazure-virtual-machineaws-code-deploy

AWS CodeDeploy for Azure Virtual Machine


this might come off as a rather far fetched query but please help me out.

Is it possible to register an Azure Virtual Machine with AWS CodeDeploy?

I've done some read up and found that Amazon provides option to install the CodeDeploy agent on On-Premises instances as seen HERE

If it is at all possible, how do we go about it?

My objective is to try and use CodeDeploy as we are already subscribed to it instead of using Azure's DevOps services.


Solution

  • As suggested by @silent, I tried it out and it actually works. Here are the steps:

    But before we start, MIND YOU!: enter image description here

    Step 1: Install AWS CLI

    Step 2: Configure AWS with a user that has the role of the CodeDeploy IAM user

    Step 3: Run the following command

      aws deploy register 
      --instance-name <some name for your VM> 
      --iam-user-arn <IAM user arn> 
      --tags Key=<some key for you tag>,Value=<some value> 
      --region <your region>
    

    Step 4: run aws deploy install --config-file codedeploy.onpremises.yml