1

I have single ec2 instance running on ubuntu server and I am trying to implement CI/CD flow using codedeploy and source is bit-bucket.I jave also installed codedeploy-agent on ec2 instance and it is installed and running successfully but whenever I am deploying code on ec2 deployment is failing with an error shown below:

The overall deployment failed because too many individual instances failed deployment, too few 
healthy instances are available for deployment, or some instances in your deployment group are 
experiencing problems.

In the CodeDeploy agent log file that I am accessing using less /var/log/aws/codedeploy-agent/codedeploy-agent.log showing below error:

ERROR [codedeploy-agent(31598)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: 
Missing credentials - please check if this instance was started with an IAM instance profile

I am unable to understand how can I overcome this error someone let me know.

Digvijay
  • 2,887
  • 3
  • 36
  • 86

1 Answers1

1

CodeDeploy agent requires IAM permissions provided by IAM role/profile of your instance. The exact permissions needed are given in AWS docs:

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • I have created IAM role for my ec2 instance but now error shows `The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml".` – Digvijay Aug 17 '21 at 06:19
  • How can I create this appspec.yml file and what should I include in it. – Digvijay Aug 17 '21 at 06:20
  • @Digvijay This is the new issue, thus I would suggest making the new question with relevant details. – Marcin Aug 17 '21 at 07:39
  • Could you please look into this question https://stackoverflow.com/questions/68813464/showing-error-in-creating-bitbucket-pipeline-for-aws-codedeploy-on-ec2 – Digvijay Aug 17 '21 at 07:45