2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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.
répondu il y a 2 ans
1
That works! I was reading the { [string]: BehaviorOptions }
from the docs as some string list what was causing my confusion
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- Réponse acceptéedemandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 8 mois
- AWS OFFICIELA mis à jour il y a 2 ans