Terraform ECR STOPPED (CannotPullECRContainerError: AccessDeniedException)

I my case the default instance profile, called aws-elasticbeanstalk-ec2-role was missing the policy AmazonEC2ContainerRegistryFullAccess. Adding it solved the issue. aws-elasticbeanstalk-ec2-role


So found how to fix the problem. I was missing the following rights in the policy:

"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:BatchGetImage",
"ecr:GetDownloadUrlForLayer"