Skip to content
Discussion options

You must be logged in to vote

Natively, it appears you're only able to fetch the ref and ARN unfortunately https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancer.html#aws-resource-lightsail-loadbalancer-return-values

To work around this while still using lightsail, you will probably need to implement a custom resource that allows for API calls during deployment. We have a construct AwsCustomResource that makes it easy to make an arbitrary API call. You could use AwsCustomResource to make a getLoadBalancer call, and then reference the returned dnsName in your CloudFront resource.

It may be a bit tricky getting this setup properly if you've never used custom resources before, …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@marcotondi
Comment options

@marcotondi
Comment options

Answer selected by peterwoodworth
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants