question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aws-cloudfront needs fromDistributionAttributes support

See original GitHub issue

There is no way to use a existing cloud front distribution in aws cdk.

Use Case

Reusing existing components is useful in several use cases. one of them is mentioned in the stack overflow question.

https://stackoverflow.com/questions/58286081/re-use-existing-cloudfront-distribution-with-aws-cdk/59561890#59561890

Proposed Solution

the solution should be as it is on other resources ex:

static fromUserPoolAttributes(scope, id, attrs) for cognito UserPools.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:16
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
shellscapecommented, Apr 8, 2021

@njlaw I’d love to see some follow up on the comment by @maraisr. We have roughly 30 individual stacks in different repos, deployed by different teams, which falls into the scenario mentioned by @maraisr - our APIs are created outside of the scope of the distribution.

7reactions
njlynchcommented, Aug 11, 2020

@HannesT117 - Unfortunately not. Generally, imported resources can’t be themselves modified; they can have other dependent resources added to them (e.g., new listener for a load balancer) and can be referenced by other constructs (e.g., use the distribution for a Route53 target, reference ARNs or identifiers in policies). The distribution and all of its properties – including the origins and behaviors – are all part of a single entity and so can’t be modified on import.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CloudFront::Distribution - AWS CloudFormation
A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery....
Read more >
AWS::CloudFront::Distribution DistributionConfig
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution. Required: No. Type: List of String. Update ......
Read more >
Values that you specify when you create or update a distribution
When you use the CloudFront console to create a new distribution or update an existing distribution, you specify the following values.
Read more >
Troubleshooting distribution issues - Amazon CloudFront
Help solving issues that you might experience when setting up CloudFront with your website or application.
Read more >
AWS::CloudFront::Distribution ViewerCertificate
A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. If the distribution doesn't use Aliases (also known ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found