Open HieronyM opened 10 months ago
The current solution does not reuse an existing CloudFront distribution. In order to do that, you have to change the CDK code to import an existing CloudFront Distirbution using the following method fromDistributionAttributes
When you do that, bucket Y should be used, as it's the source of your images.
@achrafsouk ,
Currently I'm not really familiar with AWS CDK, is there any manual way to change or deploy this solution?
Well of course you can do it in the console.
Thanks for the reply @achrafsouk ,
btw I have question regarding my 1st question,
let's say I decide with this approach instead for the deployment cdk deploy -c S3_IMAGE_BUCKET_NAME='bucket-Y'
Is there any way the deployment harm the object in Bucket Y? Apparently, I used same S3 bucket to serve Dev and Prod assets.
I have a similar question, is it recommended to delete my old distribution and associate custom domains to new distributuion?
actually I already comment on #10, But for visibility I will create another one.
So I want to deploy the solution on already existed Cloudfront distribution. I have a static website host in bucket X, but the web get assets (images, etc) from bucket Y.
To deploy it, what command should I use?
cdk deploy -c S3_IMAGE_BUCKET_NAME='bucket-X'
orcdk deploy -c S3_IMAGE_BUCKET_NAME='bucket-Y'
?Thank you,