Skip to content
v2.278.0

FargatePlatformVersion Enum ​

The platform version on which to run your service.

Example ​

ts
declare const cluster: ecs.Cluster;
const scheduledFargateTask = new ecsPatterns.ScheduledFargateTask(this, 'ScheduledFargateTask', {
  cluster,
  scheduledFargateTaskImageOptions: {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
    containerName: 'customContainerName',
    memoryLimitMiB: 512,
  },
  schedule: appscaling.Schedule.expression('rate(1 minute)'),
  platformVersion: ecs.FargatePlatformVersion.LATEST,
});
python
# cluster: ecs.Cluster

scheduled_fargate_task = ecs_patterns.ScheduledFargateTask(self, "ScheduledFargateTask",
    cluster=cluster,
    scheduled_fargate_task_image_options=ecsPatterns.ScheduledFargateTaskImageOptions(
        image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
        container_name="customContainerName",
        memory_limit_mi_b=512
    ),
    schedule=appscaling.Schedule.expression("rate(1 minute)"),
    platform_version=ecs.FargatePlatformVersion.LATEST
)
java
Cluster cluster;

ScheduledFargateTask scheduledFargateTask = ScheduledFargateTask.Builder.create(this, "ScheduledFargateTask")
        .cluster(cluster)
        .scheduledFargateTaskImageOptions(ScheduledFargateTaskImageOptions.builder()
                .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
                .containerName("customContainerName")
                .memoryLimitMiB(512)
                .build())
        .schedule(Schedule.expression("rate(1 minute)"))
        .platformVersion(FargatePlatformVersion.LATEST)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Cluster cluster;

var scheduledFargateTask = new ScheduledFargateTask(this, "ScheduledFargateTask", new ScheduledFargateTaskProps {
    Cluster = cluster,
    ScheduledFargateTaskImageOptions = new ScheduledFargateTaskImageOptions {
        Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample"),
        ContainerName = "customContainerName",
        MemoryLimitMiB = 512
    },
    Schedule = Schedule.Expression("rate(1 minute)"),
    PlatformVersion = FargatePlatformVersion.LATEST
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cluster Cluster

scheduledFargateTask := ecsPatterns.NewScheduledFargateTask(this, jsii.String("ScheduledFargateTask"), &ScheduledFargateTaskProps{
	Cluster: Cluster,
	ScheduledFargateTaskImageOptions: &ScheduledFargateTaskImageOptions{
		Image: ecs.ContainerImage_FromRegistry(jsii.String("amazon/amazon-ecs-sample")),
		ContainerName: jsii.String("customContainerName"),
		MemoryLimitMiB: jsii.Number(512),
	},
	Schedule: appscaling.Schedule_Expression(jsii.String("rate(1 minute)")),
	PlatformVersion: ecs.FargatePlatformVersion_LATEST,
})

Members ​

MemberDescription
LATESTThe latest, recommended platform version.
VERSION1_4Version 1.4.0.
VERSION1_3Version 1.3.0.
VERSION1_2Version 1.2.0.
VERSION1_1Version 1.1.0.
VERSION1_0Initial release.

Referenced by ​