Overview
ECR (Elastic Container Registry) stores your Docker container images for ECS deployments. Fjall automatically creates and manages ECR repositories when you useComputeFactory with type: "ecs" - you typically don’t need to create them manually.
Automatic Management
When you deploy ECS containers with Fjall, ECR repositories are automatically:- Created with your application name
- Configured with image scanning
- Set up with lifecycle policies
- Granted access to your ECS tasks
Pushing Images
Using Docker CLI
In CI/CD Pipeline
Manual Repository Creation
Only create explicit ECR repositories if you need:- Shared repositories across multiple applications
- Custom lifecycle or scanning policies
- Cross-account repository access
Using Custom Repositories
Specify Repository in ComputeFactory
Use Specific Image Tag
Lifecycle Policies
Keep recent images, remove old ones:Image Scanning
Automatically scan for vulnerabilities:Lambda Container Images
Use ECR for Lambda container images:Cross-Account Access
Share images with other AWS accounts:Repository URLs
Get repository information:Best Practices
- Let Fjall manage ECR for standard ECS deployments
- Enable image scanning to detect vulnerabilities
- Use lifecycle policies to limit storage costs
- Tag images with version numbers (e.g., v1.2.3, git SHA)
- Use separate repos for different applications
- Implement CI/CD for automated image builds
- Monitor scan results and update base images regularly
Common Issues
Image Pull Errors
If ECS can’t pull images:- Verify ECR repository exists in the same region
- Check ECS task role has ECR pull permissions (Fjall handles this automatically)
- Ensure image tag exists in repository
- Confirm repository name matches configuration
Large Image Sizes
Optimize image size:- Use multi-stage Docker builds
- Choose minimal base images (alpine, distroless)
- Remove unnecessary files and dependencies
- Combine RUN commands to reduce layers
See Also
- ComputeFactory - Deploy ECS containers
- ECS Cluster - Container orchestration
- Lambda Function - Container-based Lambda