Way to Connect to all ec2-instances one by one
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)