UPD: revamped code again

This commit is contained in:
xpk 2024-03-08 09:39:33 +08:00
parent b47c62f944
commit 00260939fa
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ def stop_instances(instances: list[str]) -> dict:
def instance_status(instances: list[str]) -> str:
time.sleep(10)
ec2 = boto3.client('ec2', region_name=os.environ['AWS_REGION'])
ec2Array = []
ec2Array: list[dict] = []
response = ec2.describe_instances(InstanceIds=instances)
for r in response['Reservations']:
for i in r['Instances']: