Do you have VPC endpoints set up for your network? That's probably why your fargate instances can fetch ECR repositories without much charges.
If you don't have NAT gateway set up (and no VPC endpoint), you're probably using your Fargate containers in your public subnet where its using the Internet Gateway to fetch images from ECR. I'm not sure if Internet Gateways have a per-GB charge, I think it doesnt. If this is the case, you probably don't have to worry about this problem
Found this in the ECR pricing documentation:
I guess since EC2 is underlying Fargate and I'm using the same region, it's free in this case.
Question: What was the need for your NAT Gateway in your configuration? I don't have one and ECR <–> Fargate seem to be communicating fine.
Do you have VPC endpoints set up for your network? That's probably why your fargate instances can fetch ECR repositories without much charges.
If you don't have NAT gateway set up (and no VPC endpoint), you're probably using your Fargate containers in your public subnet where its using the Internet Gateway to fetch images from ECR. I'm not sure if Internet Gateways have a per-GB charge, I think it doesnt. If this is the case, you probably don't have to worry about this problem
Thanks for the insights!