Skip to content
GitHubXDiscord

ScheduleGroup

The ScheduleGroup resource lets you manage AWS Scheduler ScheduleGroups for organizing and controlling scheduled tasks.

Create a basic ScheduleGroup with a name and tags.

import AWS from "alchemy/aws/control";
const basicScheduleGroup = await AWS.Scheduler.ScheduleGroup("basicScheduleGroup", {
name: "MyFirstScheduleGroup",
tags: [
{ Key: "Environment", Value: "Development" },
{ Key: "Project", Value: "SchedulerDemo" }
]
});

Configure a ScheduleGroup with additional properties like adopting existing resources.

const advancedScheduleGroup = await AWS.Scheduler.ScheduleGroup("advancedScheduleGroup", {
name: "MyAdvancedScheduleGroup",
tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "SchedulerDemo" }
],
adopt: true // This will adopt an existing resource if it already exists
});

Create a ScheduleGroup that utilizes multiple tags for better organization.

const taggedScheduleGroup = await AWS.Scheduler.ScheduleGroup("taggedScheduleGroup", {
name: "MyTaggedScheduleGroup",
tags: [
{ Key: "Department", Value: "Engineering" },
{ Key: "Owner", Value: "Alice" },
{ Key: "Status", Value: "Active" }
]
});

Create a ScheduleGroup with Specific Names

Section titled “Create a ScheduleGroup with Specific Names”

Demonstrate creating multiple ScheduleGroups with distinct names for different environments.

const devScheduleGroup = await AWS.Scheduler.ScheduleGroup("devScheduleGroup", {
name: "DevelopmentSchedulerGroup"
});
const prodScheduleGroup = await AWS.Scheduler.ScheduleGroup("prodScheduleGroup", {
name: "ProductionSchedulerGroup"
});