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?
- More information might be helpful, like whats the end result? You want to run commands on these servers? Why not use ansible?Levi– Levi2018-06-02 23:20:34 +00:00Commented Jun 2, 2018 at 23:20
- @Levi I need to extract some information from database.yml files residing in each ec2 instancesPrashast– Prashast2018-06-04 18:57:51 +00:00Commented Jun 4, 2018 at 18:57
Add a comment |
1 Answer
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)