Skip to content

Instantly share code, notes, and snippets.

@jimnarey
Created April 9, 2025 09:42
Show Gist options
  • Save jimnarey/9fb47ef8165e606622ec474d657ba87b to your computer and use it in GitHub Desktop.
Save jimnarey/9fb47ef8165e606622ec474d657ba87b to your computer and use it in GitHub Desktop.
import boto3
session = boto3.session.Session(profile_name='test')
cf_client = session.client("cloudformation", region_name="eu-west-2")
route_53_client = session.client("route53", region_name="eu-west-2")
# Even though at least some zones are visible in the console, they don't seem to be here.
resources = cf_client.describe_stack_resources(StackName='domains-iac-stack')
# Try it from the other direction and get the stacks from the zones,
# in particualr the tags
hosted_zones = route_53_client.list_hosted_zones()["HostedZones"]
# Not in the outputs. We could do this manually.
stack_details = cf_client.describe_stacks(StackName='domains-iac-stack')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment