|
@@ -182,13 +182,13 @@ if __name__ == "__main__":
|
|
|
if len(instances[p]) > 0:
|
|
|
for i in ec2[p].instances.filter(InstanceIds=instances[p]):
|
|
|
if args.action == 'start':
|
|
|
- print(f'Starting instances in profile { p }: { instances[p] }')
|
|
|
+ print(f'Starting instances in profile { p }: { i.instance_id }')
|
|
|
try:
|
|
|
i.start(DryRun=args.dry_run)
|
|
|
except Exception as e:
|
|
|
print(f'An error occured while starting instance {i.id}. Error: {e}. Skipping.')
|
|
|
elif args.action == 'stop':
|
|
|
- print(f'Stopping instances in profile { p }: { instances[p] }')
|
|
|
+ print(f'Stopping instances in profile { p }: { i.instance_id }')
|
|
|
try:
|
|
|
i.stop(DryRun=args.dry_run)
|
|
|
except Exception as e:
|