- Newest
- Most votes
- Most comments
Hi!
So when you create a default vpc its created with the following components, which includes a IGW https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#default-vpc-components You will have to check in VPC to see what subnets were created on your behalf by going to the VPC console.
If you want to use an existing VPC/Subnet that is private you specify this at cluster creation, by selecting the VPC from the drop down. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create_cluster.html
For setting up an ALB to your tasks, here is step by step process https://docs.aws.amazon.com/AmazonECS/latest/userguide/create-application-load-balancer.html
You have two options utilize the existing ECS cluster and spin up an ALB to attach to that task or recreate cluster in VPC where ALB lives and then attach task. Since you want this to private might be best to delete ECS cluster and spin up in correct VPC then attach task as targets for ALB (ensure your ALB properly setup per above documentation).
Currently I don't have any cluster, so I need to create one, just would like to make sure it is in the private subnet. Just trying to apply best practice and where to start. I already have ALB and can create target group(IP address) which I can attach my cluster.
There are a few components here that may be in focus.
It sounds as though you are using the awsvpc
task definition. In this case you must create a vpc, subnet, and security group for the service. This is in AWS documentation here
If you are using task types bridge
, host
, or none
, you can find information about using your configured load balancers here
Hope this helps!
Relevant content
- asked 4 months ago
- Accepted Answerasked 5 months ago
- asked 9 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 years ago
Seems like it is more clear in new the Interface, I was using old interface to follow some of youtube videos. Thank you.