Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Correcting paramter for ecs.describe_container_instances and `ec2.d… #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lambda_health_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ def get_ecs_data():
if len(list_instance_arns.keys()) > 0:
response = ecs.describe_container_instances(
cluster=cluster_name,
containerInstances=list_instance_arns.keys())
containerInstances=list(list_instance_arns.keys()))
for instance in response['containerInstances']:
list_ec2_instances[instance['ec2InstanceId']] = {'instanceArn': instance['containerInstanceArn']}
list_instance_arns[instance['containerInstanceArn']]['instanceId'] = instance['ec2InstanceId']
if len(list_ec2_instances.keys()) > 0:
response = ec2.describe_instances(InstanceIds=list_ec2_instances.keys())
response = ec2.describe_instances(InstanceIds=list(list_ec2_instances.keys()))
for reservation in response['Reservations']:
for instance in reservation['Instances']:
list_ec2_instances[instance['InstanceId']]['privateIP'] = instance['PrivateIpAddress']
Expand Down