1

Is there any way through which I can connect to all ec2-instances one by one through Python script to extract some server information from there. Please note that all ec2-instances lies behind a bastion host. Using shell script I can do that but how about python. Is there any specific library?

2
  • More information might be helpful, like whats the end result? You want to run commands on these servers? Why not use ansible? Commented Jun 2, 2018 at 23:20
  • @Levi I need to extract some information from database.yml files residing in each ec2 instances Commented Jun 4, 2018 at 18:57

1 Answer 1

0

You can benefit from EC2 inventory script provided by Ansible - click It will allow you to to connect to all ec2-instances, one by one (in serial: 1 mode)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.