This message was deleted.
# python
s
This message was deleted.
b
you basically need to run the iteration inside an
apply
f
Like this?:
Copy code
shared_hosted_zone_ids = Output.all(shared_hosted_zones).apply(
                lambda shared_hosted_zones: zone["zone_id"] for zone in shared_hosted_zones if zone["name"] == f"{domain_prefix}.{name}")
but still get
Copy code
TypeError: 'Output' object is not iterable, consider iterating the underlying value inside an 'apply'
b
it’s hard to follow the code a little, but if you’re getting that error you’re trying to iterate over an async value
f
ohhhhh, oh, right. Don’t iterate over an async value, within an async value. Got it, thanks! Sorry for asking, my bad.
b
no need to apologise for asking questions, tat’s why we’re here!