Fix case when no instances are discovered

[no story]
Fix AWS api usage for later versions

[no story]