Lightsail Codepipeline/Codedeploy/Codecommit Integration Failing

0

Working to test Integration and process of using AWS CodeDeploy/CodePipeline/CodeCommit with a Lightsail instance.

I have the instance registered as on-premise with a name tag of Key=Name,value=N7DQWebSiteCodeDeploy. The registered instance shows in the Onpremise instance listing. When I do configure CodeDeploy, I use the same key and value tied to the LightSail instance. The first step of the pipeline works deploying the branch to S3 as expected.

The deployment step fails with the following message: The deployment failed because no instances were found for your deployment group. Check your deployment group settings to make sure the tags for your Amazon EC2 instances or Auto Scaling groups correctly identify the instances you want to deploy to, and then try again.

What am I missing? How can I determine that CodeDeploy sees the instance that is registered and is communicating with it?

The logs on the lightsail instance seem to be showing no issues:
2020-11-01 08:52:33 INFO [codedeploy-agent(1612300)]: Aws::CodeDeployCommand::Client 200 45.033364 0 retries poll_host_command(host_identifier:"arn:aws:iam::xxxxxxxxxxxxxxxxx:user/AWS/CodeDeploy/n7dq-0")

2020-11-01 08:52:34 INFO [codedeploy-agent(1612300)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.2.0-1866_deb.

Thanks
Mike

Edited by: mbatesco on Nov 1, 2020 8:57 AM

gefragt vor 4 Jahren503 Aufrufe
1 Antwort
0

Sometimes you find the answer yourself.

Make sure your tags are consistent across your deployment, in this case I made sure the following matched:

LightSail instance: Key=Name,value=N7DQWebSiteCodeDeploy
Deployment Group: Key=Name,value=N7DQWebSiteCodeDeploy
And after I created the instance:aws deploy add-tags-to-on-premises-instances --instance-names xxxx-0 --tags Key=Name,Value=N7DQWebSiteCodeDeploy --region us-west-2

The Key must match case and the Value must match along with case as well.

Got it working. To get this work I gave the account system admin privs after creating it via this article: https://blog.ridmik.com/making-aws-lightsail-instances-work-with-codedeploy/ now to remove that level of privs.

Mike

beantwortet vor 4 Jahren
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen