Carina

Resource

awscc.scheduler.Schedule

CloudFormation Type: AWS::Scheduler::Schedule

Definition of AWS::Scheduler::Schedule Resource Type

Example

let notifications = awscc.sns.Topic {
  topic_name   = 'carina-example-scheduled-notifications'
  display_name = 'Carina scheduled notifications'

  tags = {
    Environment = 'example'
  }
}

let scheduler_role = awscc.iam.Role {
  role_name = 'carina-example-scheduler-role'

  assume_role_policy_document = {
    version = aws.iam.PolicyDocument.Version.2012_10_17
    statement {
      effect = aws.iam.PolicyDocument.Statement.Effect.allow

      principal = {
        service = 'scheduler.amazonaws.com'
      }

      action = 'sts:AssumeRole'
    }
  }
}

awscc.iam.RolePolicy {
  policy_name = 'PublishScheduledNotifications'
  role_name   = scheduler_role.role_name

  policy_document = {
    version = aws.iam.PolicyDocument.Version.2012_10_17
    statement {
      effect   = aws.iam.PolicyDocument.Statement.Effect.allow
      action   = 'sns:Publish'
      resource = notifications.topic_arn
    }
  }
}

awscc.scheduler.Schedule {
  name                = 'carina-example-publish-notification'
  description         = 'Publish a notification every six hours'
  # Cloud Control cannot read back schedules in a custom group by name; keep
  # Carina-managed schedules in the default group.
  group_name          = 'default'
  schedule_expression = 'rate(6 hours)'
  state               = aws.scheduler.Schedule.ScheduleState.enabled

  flexible_time_window = {
    mode = aws.scheduler.Schedule.FlexibleTimeWindow.FlexibleTimeWindowMode.off
  }

  target = {
    arn      = notifications.topic_arn
    role_arn = scheduler_role.arn
    input    = 'Scheduled notification from Carina'
  }
}

Argument Reference

description

The description of the schedule.

end_date

The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.

flexible_time_window

group_name

The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used. Carina requires group_name to be omitted or set to the literal 'default'. Cloud Control identifies schedules by Name only and reads them in the default group, so a schedule in another group can be created but never read or tracked.

kms_key_arn

The ARN for a KMS Key that will be used to encrypt customer data.

name

schedule_expression

The scheduling expression.

schedule_expression_timezone

The timezone in which the scheduling expression is evaluated.

start_date

The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.

state

target

Enum Values

flexible_time_window.mode (FlexibleTimeWindowMode)

Value DSL Identifier
OFF aws.scheduler.Schedule.FlexibleTimeWindow.FlexibleTimeWindowMode.off
FLEXIBLE aws.scheduler.Schedule.FlexibleTimeWindow.FlexibleTimeWindowMode.flexible

Shorthand formats: off or FlexibleTimeWindowMode.off

state (ScheduleState)

Value DSL Identifier
ENABLED aws.scheduler.Schedule.ScheduleState.enabled
DISABLED aws.scheduler.Schedule.ScheduleState.disabled

Shorthand formats: enabled or ScheduleState.enabled

target.ecs_parameters.launch_type (LaunchType)

Value DSL Identifier
EC2 aws.scheduler.Schedule.Target.EcsParameters.LaunchType.ec2
FARGATE aws.scheduler.Schedule.Target.EcsParameters.LaunchType.fargate
EXTERNAL aws.scheduler.Schedule.Target.EcsParameters.LaunchType.external

Shorthand formats: ec2 or LaunchType.ec2

target.ecs_parameters.network_configuration.awsvpc_configuration.assign_public_ip (AssignPublicIp)

Value DSL Identifier
ENABLED aws.scheduler.Schedule.Target.EcsParameters.NetworkConfiguration.AwsVpcConfiguration.AssignPublicIp.enabled
DISABLED aws.scheduler.Schedule.Target.EcsParameters.NetworkConfiguration.AwsVpcConfiguration.AssignPublicIp.disabled

Shorthand formats: enabled or AssignPublicIp.enabled

target.ecs_parameters.placement_constraints.type (PlacementConstraintType)

Value DSL Identifier
distinctInstance aws.scheduler.Schedule.Target.EcsParameters.PlacementConstraint.PlacementConstraintType.distinct_instance
memberOf aws.scheduler.Schedule.Target.EcsParameters.PlacementConstraint.PlacementConstraintType.member_of

Shorthand formats: distinct_instance or PlacementConstraintType.distinct_instance

target.ecs_parameters.placement_strategy.field (Field)

Value DSL Identifier
instanceId aws.scheduler.Schedule.Target.EcsParameters.PlacementStrategy.Field.instance_id
cpu aws.scheduler.Schedule.Target.EcsParameters.PlacementStrategy.Field.cpu
memory aws.scheduler.Schedule.Target.EcsParameters.PlacementStrategy.Field.memory

Shorthand formats: instance_id or Field.instance_id

target.ecs_parameters.placement_strategy.type (PlacementStrategyType)

Value DSL Identifier
random aws.scheduler.Schedule.Target.EcsParameters.PlacementStrategy.PlacementStrategyType.random
spread aws.scheduler.Schedule.Target.EcsParameters.PlacementStrategy.PlacementStrategyType.spread
binpack aws.scheduler.Schedule.Target.EcsParameters.PlacementStrategy.PlacementStrategyType.binpack

Shorthand formats: random or PlacementStrategyType.random

target.ecs_parameters.propagate_tags (PropagateTags)

Value DSL Identifier
TASK_DEFINITION aws.scheduler.Schedule.Target.EcsParameters.PropagateTags.task_definition

Shorthand formats: task_definition or PropagateTags.task_definition

Struct Definitions

flexible_time_window

Field Type Required Description
maximum_window_in_minutes Float(1..=1440) No The maximum time window during which a schedule can be invoked.
mode Enum (FlexibleTimeWindowMode) Yes

target

Field Type Required Description
arn aws.Arn — identity: String(pattern); member: String(len: 1..=1600) Yes The Amazon Resource Name (ARN) of the target.
dead_letter_config Struct(DeadLetterConfig) No
ecs_parameters Struct(EcsParameters) No
event_bridge_parameters Struct(EventBridgeParameters) No
input String(len: 1..) No The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.
kinesis_parameters Struct(KinesisParameters) No
retry_policy Struct(RetryPolicy) No
role_arn aws.Arn — identity: String(pattern); member: String(pattern, len: 1..=1600) Yes The Amazon Resource Name (ARN) of the IAM role to be used for this target when the schedule is triggered.
sage_maker_pipeline_parameters Struct(SageMakerPipelineParameters) No
sqs_parameters Struct(SqsParameters) No

target.dead_letter_config

Field Type Required Description
arn aws.Arn — identity: String(pattern); member: String(pattern, len: 1..=1600) No The ARN of the SQS queue specified as the target for the dead-letter queue.

target.ecs_parameters

Field Type Required Description
capacity_provider_strategy List<Struct(CapacityProviderStrategyItem)> (items: ..=6) No The capacity provider strategy to use for the task.
enable_ecs_managed_tags Bool No Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
enable_execute_command Bool No Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.
group String(len: 1..=255) No Specifies an ECS task group for the task. The maximum length is 255 characters.
launch_type Enum (LaunchType) No
network_configuration Struct(NetworkConfiguration) No
placement_constraints List<Struct(PlacementConstraint)> (items: ..=10) No An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
placement_strategy List<Struct(PlacementStrategy)> (items: ..=5) No The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.
platform_version String(len: 1..=64) No Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0.
propagate_tags Enum (PropagateTags) No
reference_id String(len: ..=1024) No The reference ID to use for the task.
tags List<Map<String(pattern), String(len: 1..=256)>> (items: 0..=50) No The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
task_count Float(1..=10) No The number of tasks to create based on TaskDefinition. The default is 1.
task_definition_arn aws.Arn — identity: String(pattern); member: String(len: 1..=1600) Yes The ARN of the task definition to use if the event target is an Amazon ECS task.

target.ecs_parameters.capacity_provider_strategy

Field Type Required Description
base Float(0..=100000) No The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used. Default: 0. AWS applies the server default; pinned carina-core cannot apply nested field defaults.
capacity_provider String(len: 1..=255) Yes The short name of the capacity provider.
weight Float(0..=1000) No The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied. Default: 0. AWS applies the server default; pinned carina-core cannot apply nested field defaults.

target.ecs_parameters.network_configuration

Field Type Required Description
awsvpc_configuration Struct(AwsVpcConfiguration) No

target.ecs_parameters.network_configuration.awsvpc_configuration

Field Type Required Description
assign_public_ip Enum (AssignPublicIp) No
security_groups List<String(len: 1..=1000)> (items: 1..=5) No Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
subnets List<String(len: 1..=1000)> (items: 1..=16) Yes Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

target.ecs_parameters.placement_constraints

Field Type Required Description
expression String(len: ..=2000) No A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.
type Enum (PlacementConstraintType) No

target.ecs_parameters.placement_strategy

Field Type Required Description
field Enum (Field) No The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values are cpu and memory. For the random placement strategy, this field is not used.
type Enum (PlacementStrategyType) No

target.event_bridge_parameters

Field Type Required Description
detail_type String(len: 1..=128) Yes Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.
source String(pattern, len: 1..=256) Yes The source of the event.

target.kinesis_parameters

Field Type Required Description
partition_key String(len: 1..=256) Yes The custom parameter used as the Kinesis partition key. For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide.

target.retry_policy

Field Type Required Description
maximum_event_age_in_seconds Float(60..=86400) No The maximum amount of time, in seconds, to continue to make retry attempts.
maximum_retry_attempts Float(0..=185) No The maximum number of retry attempts to make before the request fails. Retry attempts with exponential backoff continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is reached.

target.sage_maker_pipeline_parameters

Field Type Required Description
pipeline_parameter_list List<Struct(SageMakerPipelineParameter)> (items: 0..=200) No List of Parameter names and values for SageMaker Model Building Pipeline execution.

target.sage_maker_pipeline_parameters.pipeline_parameter_list

Field Type Required Description
name String(pattern, len: 1..=256) Yes Name of parameter to start execution of a SageMaker Model Building Pipeline.
value String(len: 1..=1024) Yes Value of parameter to start execution of a SageMaker Model Building Pipeline.

target.sqs_parameters

Field Type Required Description
message_group_id String(len: 1..=128) No The FIFO message group ID to use as the target.

Attribute Reference

arn

The Amazon Resource Name (ARN) of the schedule.

AWS API narrowings

These fields are narrower than or equal to CFN. Input rules combine documented AWS domains, recorded live observations, and Carina canonical spellings for stable state comparison. A canonical DSL spelling does not claim AWS rejects other spellings. Attaching a type name adds no structural constraints. Field names below use CFN spelling.

CFN field Relation to CFN Evidence URL Verbatim quote / exact observation Checked / observed
/properties/EndDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d1","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/EndDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; ReadBackForm; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d2","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00.000Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: {"EndDate":"2031-01-01T00:00:00.000Z","StartDate":"2030-01-01T00:00:00.000Z"} 2026-11-05
/properties/EndDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d3","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T09:00:00+09:00","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/EndDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; ReadBackForm; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d4","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00.123Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: {"EndDate":"2031-01-01T00:00:00.000Z","StartDate":"2030-01-01T00:00:00.123Z"} 2026-11-05
/properties/EndDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d5","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T09:00:00.000+09:00","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/EndDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d6","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00.1Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/StartDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d1","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/StartDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; ReadBackForm; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d2","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00.000Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: {"EndDate":"2031-01-01T00:00:00.000Z","StartDate":"2030-01-01T00:00:00.000Z"} 2026-11-05
/properties/StartDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d3","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T09:00:00+09:00","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/StartDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; ReadBackForm; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d4","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00.123Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: {"EndDate":"2031-01-01T00:00:00.000Z","StartDate":"2030-01-01T00:00:00.123Z"} 2026-11-05
/properties/StartDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d5","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T09:00:00.000+09:00","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05
/properties/StartDate Subset: CFN ∩ reviewed input domain Source record ap-northeast-1; Cloud Control CreateResource/GetResource (sched-probe5.sh and corrected sched-probe5b.out); EndDate read-back verified in both successful requests; Rejected; exact input: {"EndDate":"2031-01-01T00:00:00.000Z","FlexibleTimeWindow":{"Mode":"OFF"},"Name":"probe525-d6","ScheduleExpression":"rate(1 day)","StartDate":"2030-01-01T00:00:00.1Z","State":"DISABLED","Target":{"Arn":"arn:aws:sqs:ap-northeast-1:843356546713:probe525-nonexistent","RoleArn":"arn:aws:iam::843356546713:role/probe525-scheduler"}}; result: "Invalid request provided: StartDate needs to follow the format yyyy-MM-ddTHH:mm:ss.SSSZ" 2026-11-05