Skip to content
GitHubXDiscordRSS

Group

Learn how to create, update, and manage AWS Synthetics Groups using Alchemy Cloud Control.

The Group resource lets you manage AWS Synthetics Groups for organizing and monitoring your canaries effectively.

This example demonstrates how to create a basic Synthetics Group with essential properties.

import AWS from "alchemy/aws/control";
const syntheticsGroup = await AWS.Synthetics.Group("basicSyntheticsGroup", {
name: "MySyntheticsGroup",
resourceArns: [
"arn:aws:synthetics:us-east-1:123456789012:canary:MyCanary"
],
tags: [
{ key: "Environment", value: "Production" },
{ key: "Project", value: "WebsiteMonitoring" }
]
});

In this example, we add more advanced configurations, such as adopting an existing resource if it already exists.

const advancedSyntheticsGroup = await AWS.Synthetics.Group("advancedSyntheticsGroup", {
name: "AdvancedSyntheticsGroup",
resourceArns: [
"arn:aws:synthetics:us-west-2:123456789012:canary:AnotherCanary"
],
adopt: true,
tags: [
{ key: "Environment", value: "Staging" },
{ key: "Team", value: "DevOps" }
]
});

This example illustrates how to manage multiple canaries under a single Synthetics Group.

const multiResourceGroup = await AWS.Synthetics.Group("multiResourceSyntheticsGroup", {
name: "MultiResourceGroup",
resourceArns: [
"arn:aws:synthetics:us-east-1:123456789012:canary:CanaryOne",
"arn:aws:synthetics:us-east-1:123456789012:canary:CanaryTwo"
],
tags: [
{ key: "Environment", value: "Testing" },
{ key: "Owner", value: "QA" }
]
});

This example shows how to use tags effectively to organize resources within the Synthetics Group.

const taggedSyntheticsGroup = await AWS.Synthetics.Group("taggedSyntheticsGroup", {
name: "TaggedSyntheticsGroup",
resourceArns: [
"arn:aws:synthetics:us-east-1:123456789012:canary:CanaryWithTags"
],
tags: [
{ key: "Department", value: "Monitoring" },
{ key: "Project", value: "CriticalApp" },
{ key: "Owner", value: "SRE" }
]
});