0

I am getting error in PRE_BUILD section of Code Pipeline while deploying ECS. While executing commmand for ecr login, i am getting exit status with error code 255. please see below image.

Command : - $(aws ecr get-login --no-include-email --region us-east-1)

enter image description here

Sreeraju V
  • 381
  • 3
  • 16

2 Answers2

0

Have you got aws and docker commands available in the environment?

Insert a line - set -x just above the ecr get-login line - hopefully it will display the actual commands executed.

MLu
  • 23,798
  • 5
  • 54
  • 81
  • Thanks @122588 i already solved the issue, i will post the answer. Issue occur because code deploy role permission issue. – Sreeraju V May 23 '19 at 07:47
0

Code Build Service Role automatically created in Code Pipeline was unable to access ECR, thats why i was getting exit status 255.

Solved the issue by atttaching policy AmazonEC2ContainerRegistryPowerUser to Codebuild role created.

Sreeraju V
  • 381
  • 3
  • 16