2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
You can try something like this-
const distri = new cloudfront.Distribution(this, 'myDist', { defaultBehavior: { origin: new origins.S3Origin(bucketA) }, additionalBehaviors: { '/image/' :{ origin: new origins.S3Origin(bucketB) } } // path image should got to origin bucketB });
more samples on Distribution API here-
https://docs.aws.amazon.com/cdk/api/v1/docs/aws-cloudfront-readme.html#multiple-behaviors--origins
hope this helps.
답변함 2년 전
1
That works! I was reading the { [string]: BehaviorOptions }
from the docs as some string list what was causing my confusion
답변함 2년 전
관련 콘텐츠
- AWS 공식업데이트됨 8달 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 2년 전