Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiepmullan committed Jan 4, 2025
1 parent e8d0f65 commit e8f669a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/aws-cdk-lib/aws-cloudfront-origins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,24 @@ new cloudfront.Distribution(this, 'myDist', {
});
```

### Selection Criteria: Media Quality Based with AWS Elemental MediaPackageV2

You can setup your origin group to be configured for media quality based failover with your AWS Elemental MediaPackageV2 endpoints.
You can achieve this behavior in the CDK, again using the `OriginGroup` class:

```ts
new cloudfront.Distribution(this, 'myDist', {
defaultBehavior: {
origin: new origins.OriginGroup({
primaryOrigin: new origins.HttpOrigin("<AWS Elemental MediaPackageV2 origin 1>"),
fallbackOrigin: new origins.HttpOrigin("<AWS Elemental MediaPackageV2 origin 2>"),
fallbackStatusCodes: [404],
selectionCriteria: cloudfront.OriginGroupSelectionCriteria.MEDIA_QUALITY_BASED,
}),
},
});
```

## From an API Gateway REST API

Origins can be created from an API Gateway REST API. It is recommended to use a
Expand Down

0 comments on commit e8f669a

Please sign in to comment.