1 Answer
- Newest
- Most votes
- Most comments
1
Hey there!
Are you trying to add origins to the distribution that you're creating in the second code block you provided? If that's the case, you can either list more than one originConfig
object when defining the distribution or simply refer back to the distribution
variable you assigned the new distribution to, then use the addBehavior method like this:
distribution.addBehavior(pathPattern, origin, behaviorOptions)
If you're trying to find and modify a distribution that has been created outside of the context of your CDK script, you would need to use ListDistributionsCommand() and UpdateDistributionCommand() from the SDK instead.
Hope this helps out!
answered a month ago
Relevant content
- asked 10 months ago
- asked 4 months ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago