Created
April 9, 2025 09:42
-
-
Save jimnarey/9fb47ef8165e606622ec474d657ba87b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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