3
votes

I'm trying to test AWS CodeDeploy on an On-Premises instances. I was successfully able to register, install and configure CodeDeploy on my instance. When I tried adding it to the Deployment group under on-premises instances it never showed up.

I have tagged the instance.

There's this note that I found on Use the register-on-premises-instance Command (IAM Session ARN) to Register an On-Premises Instance - AWS CodeDeploy which might seem relevant to my problem. But I'm not able to figure it out yet.

If you reuse an AWS CodeDeploy service role as part of creating a deployment group that targets on-premises instances, you must include Tag:get* to the Action portion of the service role's policy statement.

Edit

I tried creating a service role with action Tag:get* but with no luck, since it kept on complaining that

AssumeRole policy may only specify STS AssumeRole actions.

Edit-2

So, the link above was asking to attach a policy under the IAM menu to the service role with tag:Get*. I tried doing that, still no luck.

1

1 Answers

1
votes

Apparently, the On-Premises instance never shows up in the GUI for the Codedeploy. But if you try to deploy the application on a separate test group (or the same) with the On-premises instance tags same as the one you have for your instance. It will be deployed successfully.

The only thing that needs to be taken care of is adding a new service policy given in the note below:

If you reuse an AWS CodeDeploy service role as part of creating a deployment group that targets on-premises instances, you must include Tag:get* to the Action portion of the service role's policy statement.