Skip to content

Instantly share code, notes, and snippets.

@grosscol
grosscol / get-cognito-cfd-target.yaml
Last active October 5, 2022 06:47
Custom Cloudformation Resource to get CloudFront Distribution of Cognito User Pool
---
#
# This template example assumes a UserPool and UserPoolDomain exist.
# The function of this is to produce a custom resource with an attribute
# that can be referenced for DNSName of an Route53::RecordSet AliasTarget.
#
# AliasTarget:
# HostedZone: Z2FDTNDATAQYW2
# DNSNAME: !GetAtt UPDomain.CloudFrontDistribution