aws-samples / image-optimization

Simple, performant and cost efficient solution for optimizing images using Amazon CloudFront, Amazon S3 and AWS Lambda
MIT No Attribution
174 stars 106 forks source link

Does it support already exists cloudfront distribution? #10

Closed timandy closed 12 months ago

achrafsouk commented 1 year ago

This should be possible by changing the CDK code to reuse your existing distribution https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.DistributionAttributes.html

You need to be careful though not to make un desired changes on the existing one, assuming its carrying production traffic

HieronyM commented 7 months ago

Sorry to ask on closed issue,

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 asset from bucket Y.

To deploy it, what command should I use? cdk deploy -c S3_IMAGE_BUCKET_NAME='bucket-X' or cdk deploy -c S3_IMAGE_BUCKET_NAME='bucket-Y'?

Thank you