<@ULVA73B9P> I am using prefect with ECS. I am run...
# ask-marvin
b
@Marvin I am using prefect with ECS. I am running deployments with my custom image hosted in ECR. I see a lot of NAT traffic in AWS? It is not clear who is downloading that ECR image?
m
When running Prefect deployments with ECS and using a custom image hosted in ECR, the ECS tasks are responsible for pulling the image from ECR. This action can generate NAT traffic if your ECS tasks are in private subnets and need to access the internet to pull the image. To reduce NAT traffic, ensure that: 1. Your ECS tasks have the necessary IAM role with permissions to pull images from ECR. This is typically done with the
AmazonECSTaskExecutionRolePolicy
. 2. Consider using VPC endpoints for ECR to avoid NAT traffic. This allows ECS tasks to pull images from ECR without traversing the internet. For detailed guidance on setting up ECS with Prefect, you can refer to the ECS Worker Guide. If you have any more questions or need further assistance, feel free to ask.