Exception while trying to read the task definition artifact file from: <source artifact name>

AWS/AWS CodePipeline

  • situation

An error occurs during deploying to ecs using CodeDeploy after building using CodeBuild on CodePipeline.

  • error message

Exception while trying to read the task definition artifact file from: <source artifact name>

  • cause

An error occurs if the source artifact file exceeds 3MB.

  • resolution

Remove static files from the source file to reduce the size to 3MB or less, then build again.

  • reference

https://docs.aws.amazon.com/codepipeline/latest/userguide/troubleshooting.html#troubleshooting-ecstocodedeploy-size