Skip to content
GitHubXDiscordRSS

Instance

Learn how to create, update, and manage AWS SSO Instances using Alchemy Cloud Control.

The Instance resource lets you manage AWS SSO Instances and their configurations.

Create a basic AWS SSO Instance with a name and some tags.

import AWS from "alchemy/aws/control";
const ssoInstance = await AWS.SSO.Instance("mySsoInstance", {
Name: "MySSOInstance",
Tags: [
{ Key: "Environment", Value: "Development" },
{ Key: "Project", Value: "Alchemy" }
]
});

Configure an SSO Instance with the option to adopt an existing resource.

const existingSsoInstance = await AWS.SSO.Instance("existingSsoInstance", {
Name: "ExistingSSOInstance",
Tags: [
{ Key: "Environment", Value: "Production" }
],
adopt: true // Adopt an existing resource instead of failing
});

Update the tags for an existing SSO Instance to reflect a change in project status.

const updatedSsoInstance = await AWS.SSO.Instance("updateSsoInstance", {
Name: "MySSOInstance",
Tags: [
{ Key: "Environment", Value: "Staging" },
{ Key: "Project", Value: "Alchemy-Updated" }
]
});

Fetch and log the ARN and creation time of an AWS SSO Instance.

const ssoInstanceInfo = await AWS.SSO.Instance("mySsoInstance", {
Name: "MySSOInstance"
});
console.log(`SSO Instance ARN: ${ssoInstanceInfo.Arn}`);
console.log(`Creation Time: ${ssoInstanceInfo.CreationTime}`);