Skip to content

Commit

Permalink
feat(ivs): support RTMP ingest for IVS channel (#31380)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)
N/A

### Reason for this change
Add missing property.

### Description of changes
Add `insecureIngest`property.



### Description of how you validated changes
Add unit tests and integ test.


### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mazyu36 authored Sep 13, 2024
1 parent bf3764f commit a907a7e
Show file tree
Hide file tree
Showing 12 changed files with 421 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/@aws-cdk/aws-ivs-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ const myChannel = new ivs.Channel(this, 'myChannel', {
});
```

If you want to use RTMP ingest, set `insecureIngest` property to `true`.
By default, `insecureIngest` is `false` which means using RTMPS ingest.

**⚠ Note:** RTMP ingest might result in reduced security for your streams. AWS recommends that you use RTMPS for ingest, unless you have specific and verified use cases. For more information, see [Encoder Settings](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/streaming-config.html#streaming-config-settings).

```ts
const myRtmpChannel = new ivs.Channel(this, 'myRtmpChannel', {
type: ivs.ChannelType.STANDARD,
insecureIngest: true, // default value is false
});
```

### Importing an existing channel

Expand Down
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-ivs-alpha/lib/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ export interface ChannelProps {
*/
readonly authorized?: boolean;

/**
* Whether the channel allows insecure RTMP ingest.
*
* @default false
*/
readonly insecureIngest?: boolean;

/**
* Channel latency mode.
*
Expand Down Expand Up @@ -211,6 +218,7 @@ export class Channel extends ChannelBase {

const resource = new CfnChannel(this, 'Resource', {
authorized: props.authorized,
insecureIngest: props.insecureIngest,
latencyMode: props.latencyMode,
name: this.physicalName,
type: props.type,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"Resources": {
"ChannelInsecureIngestEnabled1E9B93E0": {
"Type": "AWS::IVS::Channel",
"Properties": {
"InsecureIngest": true,
"Name": "aws-cdk-ivs-insecure-ingestChannelInsecureIngestEnabled15F31314",
"Type": "STANDARD"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a907a7e

Please sign in to comment.