AWS::IVS::StreamKey - AWS CloudFormation

AWS::IVS::StreamKey

The AWS::IVS::StreamKey resource specifies an Amazon IVS stream key associated with the referenced channel. Use a stream key to initiate a live stream.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::IVS::StreamKey", "Properties" : { "ChannelArn" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::IVS::StreamKey Properties: ChannelArn: String Tags: - Tag

Properties

ChannelArn

Channel ARN for the stream.

Required: Yes

Type: String

Minimum: 1

Maximum: 128

Pattern: ^arn:aws:[is]vs:[a-z0-9-]+:[0-9]+:channel/[a-zA-Z0-9-]+$

Update requires: Replacement

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag.

Required: No

Type: List of Tag

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource ARN. For example:

{ "Ref": "myStreamKey" }

For the Amazon IVS stream key myStreamKey, Ref returns the stream key ARN.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The stream-key ARN. For example: arn:aws:ivs:us-west-2:123456789012:stream-key/g1H2I3j4k5L6

Value

The stream-key value. For example: sk_us-west-2_abcdABCDefgh_567890abcdef

Examples

Channel and Stream Key Template Examples

The following examples specify an Amazon IVS channel and stream key.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "Channel": { "Type": "AWS::IVS::Channel", "Properties": { "Name": "MyChannel", "Tags": [ { "Key": "MyKey", "Value": "MyValue" } ] } }, "StreamKey": { "Type": "AWS::IVS::StreamKey", "Properties": { "ChannelArn": {"Ref": "Channel"}, "Tags": [ { "Key": "MyKey", "Value": "MyValue" } ] } } }, "Outputs": { "ChannelArn": { "Value": {"Ref": "Channel"} }, "ChannelIngestEndpoint": { "Value": { "Fn::GetAtt": [ "Channel", "IngestEndpoint" ] } }, "ChannelPlaybackUrl": { "Value": { "Fn::GetAtt": [ "Channel", "PlaybackUrl" ] } }, "StreamKeyArn": { "Value": {"Ref": "StreamKey"} } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: Channel: Type: AWS::IVS::Channel Properties: Name: MyChannel Tags: - Key: MyKey Value: MyValue StreamKey: Type: AWS::IVS::StreamKey Properties: ChannelArn: !Ref Channel Tags: - Key: MyKey Value: MyValue Outputs: ChannelArn: Value: !Ref Channel ChannelIngestEndpoint: Value: !GetAtt Channel.IngestEndpoint ChannelPlaybackUrl: Value: !GetAtt Channel.PlaybackUrl StreamKeyArn: Value: !Ref StreamKey

See also