- 最新
- 最多得票
- 最多評論
Hello.
Does the private subnet's route table have a route to the NAT Gateway?
To run a task in a private subnet, we need to pull the container image from ECR, so we need a route to the ECS VPC endpoint or NAT Gateway.
https://docs.aws.amazon.com/AmazonECR/latest/userguide/vpc-endpoints.html
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/vpc-endpoints.html
Yes, there are 2 Routes available in the Private Subnets Route Table. one is destination 0.0.0.0/0 which points to nat-<id> and an internal ip pointing to local. The public subnets are connected to an internet gateway.
I got it to work! Thanks so much for your help! I only selected the private subnets this time and I increased the instance size to t3.medium instead of t3.micro. I'm not sure what did the trick.
Now I'm attempting to setup an API Gateway to the instance.
I have the same Issue as described , and I used the same Instance t3.medium and placed my Service in a Private Subnet instead of Public one , but Still It is Stuck In Provisioning status , Did You change anything else other than that ?
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 5 個月前
Thank you for your reply. Are you unable to launch the task successfully even if you launch it from the management console instead of from CloudFormation?
Looking at the task definition, the network mode is "awsvpc". In this case, you cannot use public subnets. Try stopping using public subnets. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking-awsvpc.html#task-networking-considerations
Also, make sure that "enableDnsHostnames" and "enableDnsSupport" are enabled in your VPC. https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support