An Ingress never gets an ALB, and the AWS Load Balancer Controller logs `Failed build model due to couldn't auto-discover subnets: unable to resolve at least one subnet`.
IntermediateTroubleshootingECS, EKS, ECR and Lambda
Answer
Likely causes → The subnets do not have the discovery tags: kubernetes.io/role/elb=1 for public subnets (internet-facing) or kubernetes.io/role/internal-elb=1 for private ones. Another cause: fewer than two AZs qualify.
Diagnose →
kubectl -n kube-system logs deploy/aws-load-balancer-controller | tail -30
kubectl describe ingress web -n prod
aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-0abc \
--query 'Subnets[].[SubnetId,AvailabilityZone,Tags[?starts_with(Key,`kubernetes.io/role`)]]'
Fix →
aws ec2 create-tags --resources subnet-0pub1 subnet-0pub2 --tags Key=kubernetes.io/role/elb,Value=1
Or list the subnets explicitly with the annotation alb.ingress.kubernetes.io/subnets. Also check that the controller's IAM role has the current policy, because new features need new permissions.
Prevent → Tag subnets in the VPC module, and pin the controller and its IAM policy version together.
More on ECS, EKS, ECR and Lambda
`docker push 111111111111.dkr.ecr.us-east-1.amazonaws.com/api:1.4` fails with `no basic auth credentials` (or `denied: Your authorization token has expired. Reauthenticate and try again.`).BeginnerFargate tasks stop with `CannotPullContainerError: pull image manifest has been retried 5 time(s): failed to resolve ref ... dial tcp 52.x.x.x:443: i/o timeout`.Intermediate`ResourceInitializationError: unable to pull secrets or registry auth: ... AccessDeniedException: User: arn:aws:sts::111111111111:assumed-role/ecsTaskExecutionRole/... is not authorized to perform: secretsmanager:GetSecretValue`.IntermediateA task stops with `Essential container in task exited`, exit code 137, and reason `OutOfMemoryError: Container killed due to memory usage`.BeginnerThe ECS service event says `service api was unable to place a task because no container instance met all of its requirements. The closest matching container-instance ... has insufficient memory available.`IntermediateAn ECS deployment rolls back automatically, and the event says `deployment failed: tasks failed to start` from the circuit breaker.Advanced