Skip to content
GitHubXDiscord

StreamKey

The StreamKey resource allows you to manage AWS IVS StreamKeys which are used to authenticate streaming sessions for your channels.

Create a basic StreamKey associated with a specific channel.

import AWS from "alchemy/aws/control";
const streamKey = await AWS.IVS.StreamKey("myStreamKey", {
ChannelArn: "arn:aws:ivs:us-west-2:123456789012:channel/abcd1234",
Tags: [
{ Key: "Environment", Value: "Production" }
]
});

Create a StreamKey with additional configurations to adopt an existing resource.

const existingStreamKey = await AWS.IVS.StreamKey("existingStreamKey", {
ChannelArn: "arn:aws:ivs:us-west-2:123456789012:channel/efgh5678",
Tags: [
{ Key: "Project", Value: "LiveStream" }
],
adopt: true // Adopt the existing resource if it already exists
});

Create a StreamKey without any tags for a simpler configuration.

const simpleStreamKey = await AWS.IVS.StreamKey("simpleStreamKey", {
ChannelArn: "arn:aws:ivs:us-west-2:123456789012:channel/ijkl91011"
});

Retrieve information about a StreamKey, including its ARN and timestamps.

const streamKeyDetails = await AWS.IVS.StreamKey("retrieveStreamKey", {
ChannelArn: "arn:aws:ivs:us-west-2:123456789012:channel/mnop121314",
Tags: [],
});
// Access specific details
console.log("StreamKey ARN:", streamKeyDetails.Arn);
console.log("Creation Time:", streamKeyDetails.CreationTime);
console.log("Last Update Time:", streamKeyDetails.LastUpdateTime);