in remoteaccountpython/get-availabilityzones.py [0:0]
def getAZsfromService(serviceEndpoints, ec2Client):
for serviceEndpoint in serviceEndpoints:
endpointDNS = serviceEndpoint['Service_Endpoint_DNS']
serviceEndpointDescription = ec2Client.describe_vpc_endpoint_services(
DryRun=False,
ServiceNames= [endpointDNS],
)
for v in serviceEndpointDescription['ServiceDetails']:
for az in v['AvailabilityZones']:
AZs.add(az)
return AZs