I'm very new to the AWS Codepipeline. I've setup an ECS cluster with the service and task definition with the image present in ECR. I have a CodeBuild job to push the new image to the ECR.

Once the pipeline is triggered, the CodeBuild runs fine and pushes the artifact to S3 and image to ECR. Post this, when the CodeDeploy job starts, I'm getting the following error.

Action execution failed InternalError. Error reference code.

I'm not getting any logs on this in cloudwatch or anywhere. Not sure what exactly is the issue.

Any help on this would be great. Would be able to provide more info if required.

Thanks in advance.

  • Having same problem here. Even customer support in AWS was not so helpful. – jesuisgenial Dec 31 '18 at 2:53

I ran into the same problem and since the error message does not really help for debugging it took me quite some time to find the root cause.

However the cause of the error was rather trivial and could be fixed by adding some missing required properties in the task definition file (taskdef.json). Please check the official AWS-ECS-TaskDefinition Docs for all properties that are required since those have to be part of the task definition file.


For me, inspite of having sufficient permissions on CodePipeline, CodeBuild & CodeDeploy for my g it happened to be the github token, that I was retrieving from AWS Secrets Manager. The secret was present in one region & I was trying to retrieve the same in a different region. I had to Replicate secrets to other regions & choose the new region where I'm trying to access the token.

replicate secrets

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.