Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain public IP behind running task of Fargate cluster #52

Open
jollopre opened this issue Aug 2, 2020 · 1 comment
Open

Obtain public IP behind running task of Fargate cluster #52

jollopre opened this issue Aug 2, 2020 · 1 comment

Comments

@jollopre
Copy link
Owner

jollopre commented Aug 2, 2020

When we deploy into Aws carpanta. We create the following resources:

  • cluster
  • task definition
  • service

In order to retrieve the public IP behind the task running in the cluster, we have to perform 3 requests (in strict order):

  1. Lists the tasks running in the cluster (e.g. aws-cli ecs list-tasks --cluster <cluster_arn>)
  2. Describe a task from a cluster (e.g. aws-cli ecs describe-tasks --cluster --cluster <cluster_arn> --tasks <task_arn>). This permits obtaining the ENI (Elastic Network Interface) id.
  3. Retrieve details of an ENI (e.g. aws-cli ec2 describe-network-interfaces --network-interface-ids <eni_id>). This contains the public IP behind the Elastic Network interface attached to the running task.

Once we have obtained the Public IP, we should log into the output the IP in order to reduce the necessity of going to the AWS panel.

@jollopre
Copy link
Owner Author

jollopre commented Aug 3, 2020

We can explore the different options provided by aws-cli ecs through docker by typing in the terminal: docker run --rm -it -v $PWD/.aws:/root/.aws amazon/aws-cli ecs help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant