1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
If you are using Fargate, pulling the container image in ECR will require communication to the NAT Gateway, which should increase costs.
The blog below is for ECS, but I believe the same situation will occur even for EKS.
https://andrew-larse514.medium.com/aws-nat-gateway-ecr-cost-gotcha-a0865d0edd4
https://pierreraffa.medium.com/cost-reduction-using-ecr-vpc-endpoints-ff87316f36a8
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 months ago
Thank you. That would explain a lot. There are like 20 pods pulling a new ECR image every time. I would have to investigate a way to not download the image on each run of the pod
Using the EC2 launch type instead of Fargate allows container images to be cached within EC2, potentially reducing costs. The blog below is in Japanese, but it states that changing from Fargate to EC2 led to cost reductions. https://techblog.zozo.com/entry/reconfigure-eks-workflow-infrastructure
This AWS blog may also be helpful. https://aws.amazon.com/jp/blogs/containers/start-pods-faster-by-prefetching-images/