Skip to content
GitHubXDiscord

PublicKey

The PublicKey resource lets you manage AWS IVS PublicKeys for securely signing video streams. This resource allows you to create and manage public keys used in the signing process of video streams.

Create a basic IVS PublicKey with required properties and one optional property:

import AWS from "alchemy/aws/control";
const publicKey = await AWS.IVS.PublicKey("myPublicKey", {
PublicKeyMaterial: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1...",
Name: "MyIVSPublicKey"
});

Configure an IVS PublicKey with tags for better resource management:

const taggedPublicKey = await AWS.IVS.PublicKey("taggedPublicKey", {
PublicKeyMaterial: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2...",
Name: "TaggedIVSPublicKey",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "LiveStream" }
]
});

Adopt an existing IVS PublicKey instead of creating a new one if it already exists:

const existingPublicKey = await AWS.IVS.PublicKey("existingPublicKey", {
PublicKeyMaterial: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3...",
Name: "ExistingIVSPublicKey",
adopt: true
});