package
1.204.0-devpreview
Repository: https://github.com/aws/aws-cdk-go.git
Documentation: pkg.go.dev

# README

Tasks for AWS Step Functions

AWS Step Functions is a web service that enables you to coordinate the components of distributed applications and microservices using visual workflows. You build applications from individual components that each perform a discrete function, or task, allowing you to scale and change applications quickly.

A Task state represents a single unit of work performed by a state machine. All work in your state machine is performed by tasks.

This module is part of the AWS Cloud Development Kit project.

Table Of Contents

Task

A Task state represents a single unit of work performed by a state machine. In the CDK, the exact work to be done is determined by a class that implements IStepFunctionsTask.

AWS Step Functions integrates with some AWS services so that you can call API actions, and coordinate executions directly from the Amazon States Language in Step Functions. You can directly call and pass parameters to the APIs of those services.

Paths

In the Amazon States Language, a path is a string beginning with $ that you can use to identify components within JSON text.

Learn more about input and output processing in Step Functions here

InputPath

Both InputPath and Parameters fields provide a way to manipulate JSON as it moves through your workflow. AWS Step Functions applies the InputPath field first, and then the Parameters field. You can first filter your raw input to a selection you want using InputPath, and then apply Parameters to manipulate that input further, or add new values. If you don't specify an InputPath, a default value of $ will be used.

The following example provides the field named input as the input to the Task state that runs a Lambda function.

var fn function

submitJob := tasks.NewLambdaInvoke(this, jsii.String("Invoke Handler"), &LambdaInvokeProps{
	LambdaFunction: fn,
	InputPath: jsii.String("$.input"),
})

OutputPath

Tasks also allow you to select a portion of the state output to pass to the next state. This enables you to filter out unwanted information, and pass only the portion of the JSON that you care about. If you don't specify an OutputPath, a default value of $ will be used. This passes the entire JSON node to the next state.

The response from a Lambda function includes the response from the function as well as other metadata.

The following example assigns the output from the Task to a field named result

var fn function

submitJob := tasks.NewLambdaInvoke(this, jsii.String("Invoke Handler"), &LambdaInvokeProps{
	LambdaFunction: fn,
	OutputPath: jsii.String("$.Payload.result"),
})

ResultSelector

You can use ResultSelector to manipulate the raw result of a Task, Map or Parallel state before it is passed to ResultPath. For service integrations, the raw result contains metadata in addition to the response payload. You can use ResultSelector to construct a JSON payload that becomes the effective result using static values or references to the raw result or context object.

The following example extracts the output payload of a Lambda function Task and combines it with some static values and the state name from the context object.

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke Handler"), &LambdaInvokeProps{
	LambdaFunction: fn,
	ResultSelector: map[string]interface{}{
		"lambdaOutput": sfn.JsonPath_stringAt(jsii.String("$.Payload")),
		"invokeRequestId": sfn.JsonPath_stringAt(jsii.String("$.SdkResponseMetadata.RequestId")),
		"staticValue": map[string]*string{
			"foo": jsii.String("bar"),
		},
		"stateName": sfn.JsonPath_stringAt(jsii.String("$.State.Name")),
	},
})

ResultPath

The output of a state can be a copy of its input, the result it produces (for example, output from a Task state’s Lambda function), or a combination of its input and result. Use ResultPath to control which combination of these is passed to the state output. If you don't specify an ResultPath, a default value of $ will be used.

The following example adds the item from calling DynamoDB's getItem API to the state input and passes it to the next state.

var myTable table

tasks.NewDynamoPutItem(this, jsii.String("PutItem"), &DynamoPutItemProps{
	Item: map[string]dynamoAttributeValue{
		"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-id")),
	},
	Table: myTable,
	ResultPath: jsii.String("$.Item"),
})

⚠️ The OutputPath is computed after applying ResultPath. All service integrations return metadata as part of their response. When using ResultPath, it's not possible to merge a subset of the task output to the input.

Task parameters from the state JSON

Most tasks take parameters. Parameter values can either be static, supplied directly in the workflow definition (by specifying their values), or a value available at runtime in the state machine's execution (either as its input or an output of a prior state). Parameter values available at runtime can be specified via the JsonPath class, using methods such as JsonPath.stringAt().

The following example provides the field named input as the input to the Lambda function and invokes it asynchronously.

var fn function


submitJob := tasks.NewLambdaInvoke(this, jsii.String("Invoke Handler"), &LambdaInvokeProps{
	LambdaFunction: fn,
	Payload: sfn.TaskInput_FromJsonPathAt(jsii.String("$.input")),
	InvocationType: tasks.LambdaInvocationType_EVENT,
})

You can also use intrinsic functions available on JsonPath, for example JsonPath.format(). Here is an example of starting an Athena query that is dynamically created using the task input:

startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Athena Start Query"), &AthenaStartQueryExecutionProps{
	QueryString: sfn.JsonPath_Format(jsii.String("select contacts where year={};"), sfn.JsonPath_StringAt(jsii.String("$.year"))),
	QueryExecutionContext: &QueryExecutionContext{
		DatabaseName: jsii.String("interactions"),
	},
	ResultConfiguration: &ResultConfiguration{
		EncryptionConfiguration: &EncryptionConfiguration{
			EncryptionOption: tasks.EncryptionOption_S3_MANAGED,
		},
		OutputLocation: &Location{
			BucketName: jsii.String("mybucket"),
			ObjectKey: jsii.String("myprefix"),
		},
	},
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})

Each service integration has its own set of parameters that can be supplied.

Evaluate Expression

Use the EvaluateExpression to perform simple operations referencing state paths. The expression referenced in the task will be evaluated in a Lambda function (eval()). This allows you to not have to write Lambda code for simple operations.

Example: convert a wait time from milliseconds to seconds, concat this in a message and wait:

convertToSeconds := tasks.NewEvaluateExpression(this, jsii.String("Convert to seconds"), &EvaluateExpressionProps{
	Expression: jsii.String("$.waitMilliseconds / 1000"),
	ResultPath: jsii.String("$.waitSeconds"),
})

createMessage := tasks.NewEvaluateExpression(this, jsii.String("Create message"), &EvaluateExpressionProps{
	// Note: this is a string inside a string.
	Expression: jsii.String("`Now waiting ${$.waitSeconds} seconds...`"),
	Runtime: lambda.Runtime_NODEJS_14_X(),
	ResultPath: jsii.String("$.message"),
})

publishMessage := tasks.NewSnsPublish(this, jsii.String("Publish message"), &SnsPublishProps{
	Topic: sns.NewTopic(this, jsii.String("cool-topic")),
	Message: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")),
	ResultPath: jsii.String("$.sns"),
})

wait := sfn.NewWait(this, jsii.String("Wait"), &WaitProps{
	Time: sfn.WaitTime_SecondsPath(jsii.String("$.waitSeconds")),
})

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	Definition: convertToSeconds.Next(createMessage).Next(publishMessage).*Next(wait),
})

The EvaluateExpression supports a runtime prop to specify the Lambda runtime to use to evaluate the expression. Currently, only runtimes of the Node.js family are supported.

API Gateway

Step Functions supports API Gateway through the service integration pattern.

HTTP APIs are designed for low-latency, cost-effective integrations with AWS services, including AWS Lambda, and HTTP endpoints. HTTP APIs support OIDC and OAuth 2.0 authorization, and come with built-in support for CORS and automatic deployments. Previous-generation REST APIs currently offer more features. More details can be found here.

Call REST API Endpoint

The CallApiGatewayRestApiEndpoint calls the REST API endpoint.

import apigateway "github.com/aws/aws-cdk-go/awscdk"

restApi := apigateway.NewRestApi(this, jsii.String("MyRestApi"))

invokeTask := tasks.NewCallApiGatewayRestApiEndpoint(this, jsii.String("Call REST API"), &CallApiGatewayRestApiEndpointProps{
	Api: restApi,
	StageName: jsii.String("prod"),
	Method: tasks.HttpMethod_GET,
})

Be aware that the header values must be arrays. When passing the Task Token in the headers field WAIT_FOR_TASK_TOKEN integration, use JsonPath.array() to wrap the token in an array:

import apigateway "github.com/aws/aws-cdk-go/awscdk"
var api restApi


tasks.NewCallApiGatewayRestApiEndpoint(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointProps{
	Api: Api,
	StageName: jsii.String("Stage"),
	Method: tasks.HttpMethod_PUT,
	IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
	Headers: sfn.TaskInput_FromObject(map[string]interface{}{
		"TaskToken": sfn.JsonPath_array(sfn.JsonPath_taskToken()),
	}),
})

Call HTTP API Endpoint

The CallApiGatewayHttpApiEndpoint calls the HTTP API endpoint.

import apigatewayv2 "github.com/aws/aws-cdk-go/awscdk"

httpApi := apigatewayv2.NewHttpApi(this, jsii.String("MyHttpApi"))

invokeTask := tasks.NewCallApiGatewayHttpApiEndpoint(this, jsii.String("Call HTTP API"), &CallApiGatewayHttpApiEndpointProps{
	ApiId: httpApi.ApiId,
	ApiStack: awscdk.*stack_Of(httpApi),
	Method: tasks.HttpMethod_GET,
})

AWS SDK

Step Functions supports calling AWS service's API actions through the service integration pattern.

You can use Step Functions' AWS SDK integrations to call any of the over two hundred AWS services directly from your state machine, giving you access to over nine thousand API actions.

var myBucket bucket

getObject := tasks.NewCallAwsService(this, jsii.String("GetObject"), &CallAwsServiceProps{
	Service: jsii.String("s3"),
	Action: jsii.String("getObject"),
	Parameters: map[string]interface{}{
		"Bucket": myBucket.bucketName,
		"Key": sfn.JsonPath_stringAt(jsii.String("$.key")),
	},
	IamResources: []*string{
		myBucket.ArnForObjects(jsii.String("*")),
	},
})

Use camelCase for actions and PascalCase for parameter names.

The task automatically adds an IAM statement to the state machine role's policy based on the service and action called. The resources for this statement must be specified in iamResources.

Use the iamAction prop to manually specify the IAM action name in the case where the IAM action name does not match with the API service/action name:

listBuckets := tasks.NewCallAwsService(this, jsii.String("ListBuckets"), &CallAwsServiceProps{
	Service: jsii.String("s3"),
	Action: jsii.String("listBuckets"),
	IamResources: []*string{
		jsii.String("*"),
	},
	IamAction: jsii.String("s3:ListAllMyBuckets"),
})

Athena

Step Functions supports Athena through the service integration pattern.

StartQueryExecution

The StartQueryExecution API runs the SQL query statement.

startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{
	QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")),
	QueryExecutionContext: &QueryExecutionContext{
		DatabaseName: jsii.String("mydatabase"),
	},
	ResultConfiguration: &ResultConfiguration{
		EncryptionConfiguration: &EncryptionConfiguration{
			EncryptionOption: tasks.EncryptionOption_S3_MANAGED,
		},
		OutputLocation: &Location{
			BucketName: jsii.String("query-results-bucket"),
			ObjectKey: jsii.String("folder"),
		},
	},
})

GetQueryExecution

The GetQueryExecution API gets information about a single execution of a query.

getQueryExecutionJob := tasks.NewAthenaGetQueryExecution(this, jsii.String("Get Query Execution"), &AthenaGetQueryExecutionProps{
	QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")),
})

GetQueryResults

The GetQueryResults API that streams the results of a single query execution specified by QueryExecutionId from S3.

getQueryResultsJob := tasks.NewAthenaGetQueryResults(this, jsii.String("Get Query Results"), &AthenaGetQueryResultsProps{
	QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")),
})

StopQueryExecution

The StopQueryExecution API that stops a query execution.

stopQueryExecutionJob := tasks.NewAthenaStopQueryExecution(this, jsii.String("Stop Query Execution"), &AthenaStopQueryExecutionProps{
	QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")),
})

Batch

Step Functions supports Batch through the service integration pattern.

SubmitJob

The SubmitJob API submits an AWS Batch job from a job definition.

import batch "github.com/aws/aws-cdk-go/awscdk"
var batchJobDefinition jobDefinition
var batchQueue jobQueue


task := tasks.NewBatchSubmitJob(this, jsii.String("Submit Job"), &BatchSubmitJobProps{
	JobDefinitionArn: batchJobDefinition.JobDefinitionArn,
	JobName: jsii.String("MyJob"),
	JobQueueArn: batchQueue.JobQueueArn,
})

CodeBuild

Step Functions supports CodeBuild through the service integration pattern.

StartBuild

StartBuild starts a CodeBuild Project by Project Name.

import "github.com/aws/aws-cdk-go/awscdk"


codebuildProject := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{
	ProjectName: jsii.String("MyTestProject"),
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string][]*string{
			"build": map[string][]*string{
				"commands": []*string{
					jsii.String("echo \"Hello, CodeBuild!\""),
				},
			},
		},
	}),
})

task := tasks.NewCodeBuildStartBuild(this, jsii.String("Task"), &CodeBuildStartBuildProps{
	Project: codebuildProject,
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
	EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{
		"ZONE": &buildEnvironmentVariable{
			"type": codebuild.BuildEnvironmentVariableType_PLAINTEXT,
			"value": sfn.JsonPath_stringAt(jsii.String("$.envVariables.zone")),
		},
	},
})

DynamoDB

You can call DynamoDB APIs from a Task state. Read more about calling DynamoDB APIs here

GetItem

The GetItem operation returns a set of attributes for the item with the given primary key.

var myTable table

tasks.NewDynamoGetItem(this, jsii.String("Get Item"), &DynamoGetItemProps{
	Key: map[string]dynamoAttributeValue{
		"messageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
	},
	Table: myTable,
})

PutItem

The PutItem operation creates a new item, or replaces an old item with a new item.

var myTable table

tasks.NewDynamoPutItem(this, jsii.String("PutItem"), &DynamoPutItemProps{
	Item: map[string]dynamoAttributeValue{
		"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
		"Text": tasks.*dynamoAttributeValue_fromString(sfn.JsonPath_stringAt(jsii.String("$.bar"))),
		"TotalCount": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(10)),
	},
	Table: myTable,
})

DeleteItem

The DeleteItem operation deletes a single item in a table by primary key.

var myTable table

tasks.NewDynamoDeleteItem(this, jsii.String("DeleteItem"), &DynamoDeleteItemProps{
	Key: map[string]dynamoAttributeValue{
		"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
	},
	Table: myTable,
	ResultPath: sfn.JsonPath_DISCARD(),
})

UpdateItem

The UpdateItem operation edits an existing item's attributes, or adds a new item to the table if it does not already exist.

var myTable table

tasks.NewDynamoUpdateItem(this, jsii.String("UpdateItem"), &DynamoUpdateItemProps{
	Key: map[string]dynamoAttributeValue{
		"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
	},
	Table: myTable,
	ExpressionAttributeValues: map[string]*dynamoAttributeValue{
		":val": tasks.*dynamoAttributeValue_numberFromString(sfn.JsonPath_stringAt(jsii.String("$.Item.TotalCount.N"))),
		":rand": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(20)),
	},
	UpdateExpression: jsii.String("SET TotalCount = :val + :rand"),
})

ECS

Step Functions supports ECS/Fargate through the service integration pattern.

RunTask

RunTask starts a new task using the specified task definition.

EC2

The EC2 launch type allows you to run your containerized applications on a cluster of Amazon EC2 instances that you manage.

When a task that uses the EC2 launch type is launched, Amazon ECS must determine where to place the task based on the requirements specified in the task definition, such as CPU and memory. Similarly, when you scale down the task count, Amazon ECS must determine which tasks to terminate. You can apply task placement strategies and constraints to customize how Amazon ECS places and terminates tasks. Learn more about task placement

The latest ACTIVE revision of the passed task definition is used for running the task.

The following example runs a job from a task definition on EC2

vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{
	IsDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &ClusterProps{
	Vpc: Vpc,
})
cluster.AddCapacity(jsii.String("DefaultAutoScalingGroup"), &AddCapacityOptions{
	InstanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	VpcSubnets: &SubnetSelection{
		SubnetType: ec2.SubnetType_PUBLIC,
	},
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{
	Compatibility: ecs.Compatibility_EC2,
})

taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
	Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")),
	MemoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
	Cluster: Cluster,
	TaskDefinition: TaskDefinition,
	LaunchTarget: tasks.NewEcsEc2LaunchTarget(&EcsEc2LaunchTargetOptions{
		PlacementStrategies: []placementStrategy{
			ecs.*placementStrategy_SpreadAcrossInstances(),
			ecs.*placementStrategy_PackedByCpu(),
			ecs.*placementStrategy_Randomly(),
		},
		PlacementConstraints: []placementConstraint{
			ecs.*placementConstraint_MemberOf(jsii.String("blieptuut")),
		},
	}),
})

Fargate

AWS Fargate is a serverless compute engine for containers that works with Amazon Elastic Container Service (ECS). Fargate makes it easy for you to focus on building your applications. Fargate removes the need to provision and manage servers, lets you specify and pay for resources per application, and improves security through application isolation by design. Learn more about Fargate

The Fargate launch type allows you to run your containerized applications without the need to provision and manage the backend infrastructure. Just register your task definition and Fargate launches the container for you. The latest ACTIVE revision of the passed task definition is used for running the task. Learn more about Fargate Versioning

The following example runs a job from a task definition on Fargate

vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{
	IsDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("FargateCluster"), &ClusterProps{
	Vpc: Vpc,
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{
	MemoryMiB: jsii.String("512"),
	Cpu: jsii.String("256"),
	Compatibility: ecs.Compatibility_FARGATE,
})

containerDefinition := taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
	Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")),
	MemoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("RunFargate"), &EcsRunTaskProps{
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
	Cluster: Cluster,
	TaskDefinition: TaskDefinition,
	AssignPublicIp: jsii.Boolean(true),
	ContainerOverrides: []containerOverride{
		&containerOverride{
			ContainerDefinition: *ContainerDefinition,
			Environment: []taskEnvironmentVariable{
				&taskEnvironmentVariable{
					Name: jsii.String("SOME_KEY"),
					Value: sfn.JsonPath_StringAt(jsii.String("$.SomeKey")),
				},
			},
		},
	},
	LaunchTarget: tasks.NewEcsFargateLaunchTarget(),
})

EMR

Step Functions supports Amazon EMR through the service integration pattern. The service integration APIs correspond to Amazon EMR APIs but differ in the parameters that are used.

Read more about the differences when using these service integrations.

Create Cluster

Creates and starts running a cluster (job flow). Corresponds to the runJobFlow API in EMR.

clusterRole := iam.NewRole(this, jsii.String("ClusterRole"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("ec2.amazonaws.com")),
})

serviceRole := iam.NewRole(this, jsii.String("ServiceRole"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")),
})

autoScalingRole := iam.NewRole(this, jsii.String("AutoScalingRole"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")),
})

autoScalingRole.AssumeRolePolicy.AddStatements(
iam.NewPolicyStatement(&PolicyStatementProps{
	Effect: iam.Effect_ALLOW,
	Principals: []iPrincipal{
		iam.NewServicePrincipal(jsii.String("application-autoscaling.amazonaws.com")),
	},
	Actions: []*string{
		jsii.String("sts:AssumeRole"),
	},
}))

tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
	},
	ClusterRole: ClusterRole,
	Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value,
	ServiceRole: ServiceRole,
	AutoScalingRole: AutoScalingRole,
})

If you want to run multiple steps in parallel, you can specify the stepConcurrencyLevel property. The concurrency range is between 1 and 256 inclusive, where the default concurrency of 1 means no step concurrency is allowed. stepConcurrencyLevel requires the EMR release label to be 5.28.0 or above.

tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
	},
	Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value,
	StepConcurrencyLevel: jsii.Number(10),
})

Termination Protection

Locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or a job-flow error.

Corresponds to the setTerminationProtection API in EMR.

tasks.NewEmrSetClusterTerminationProtection(this, jsii.String("Task"), &EmrSetClusterTerminationProtectionProps{
	ClusterId: jsii.String("ClusterId"),
	TerminationProtected: jsii.Boolean(false),
})

Terminate Cluster

Shuts down a cluster (job flow). Corresponds to the terminateJobFlows API in EMR.

tasks.NewEmrTerminateCluster(this, jsii.String("Task"), &EmrTerminateClusterProps{
	ClusterId: jsii.String("ClusterId"),
})

Add Step

Adds a new step to a running cluster. Corresponds to the addJobFlowSteps API in EMR.

tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{
	ClusterId: jsii.String("ClusterId"),
	Name: jsii.String("StepName"),
	Jar: jsii.String("Jar"),
	ActionOnFailure: tasks.ActionOnFailure_CONTINUE,
})

Cancel Step

Cancels a pending step in a running cluster. Corresponds to the cancelSteps API in EMR.

tasks.NewEmrCancelStep(this, jsii.String("Task"), &EmrCancelStepProps{
	ClusterId: jsii.String("ClusterId"),
	StepId: jsii.String("StepId"),
})

Modify Instance Fleet

Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetName.

Corresponds to the modifyInstanceFleet API in EMR.

tasks.NewEmrModifyInstanceFleetByName(this, jsii.String("Task"), &EmrModifyInstanceFleetByNameProps{
	ClusterId: jsii.String("ClusterId"),
	InstanceFleetName: jsii.String("InstanceFleetName"),
	TargetOnDemandCapacity: jsii.Number(2),
	TargetSpotCapacity: jsii.Number(0),
})

Modify Instance Group

Modifies the number of nodes and configuration settings of an instance group.

Corresponds to the modifyInstanceGroups API in EMR.

tasks.NewEmrModifyInstanceGroupByName(this, jsii.String("Task"), &EmrModifyInstanceGroupByNameProps{
	ClusterId: jsii.String("ClusterId"),
	InstanceGroupName: sfn.JsonPath_StringAt(jsii.String("$.InstanceGroupName")),
	InstanceGroup: &InstanceGroupModifyConfigProperty{
		InstanceCount: jsii.Number(1),
	},
})

EMR on EKS

Step Functions supports Amazon EMR on EKS through the service integration pattern. The service integration APIs correspond to Amazon EMR on EKS APIs, but differ in the parameters that are used.

Read more about the differences when using these service integrations.

Setting up the EKS cluster is required.

Create Virtual Cluster

The CreateVirtualCluster API creates a single virtual cluster that's mapped to a single Kubernetes namespace.

The EKS cluster containing the Kubernetes namespace where the virtual cluster will be mapped can be passed in from the task input.

tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{
	EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))),
})

The EKS cluster can also be passed in directly.

import eks "github.com/aws/aws-cdk-go/awscdk"

var eksCluster cluster


tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{
	EksCluster: tasks.EksClusterInput_FromCluster(eksCluster),
})

By default, the Kubernetes namespace that a virtual cluster maps to is "default", but a specific namespace within an EKS cluster can be selected.

tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{
	EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))),
	EksNamespace: jsii.String("specified-namespace"),
})

Delete Virtual Cluster

The DeleteVirtualCluster API deletes a virtual cluster.

tasks.NewEmrContainersDeleteVirtualCluster(this, jsii.String("Delete a Virtual Cluster"), &EmrContainersDeleteVirtualClusterProps{
	VirtualClusterId: sfn.TaskInput_FromJsonPathAt(jsii.String("$.virtualCluster")),
})

Start Job Run

The StartJobRun API starts a job run. A job is a unit of work that you submit to Amazon EMR on EKS for execution. The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query. A job run is an execution of the job on the virtual cluster.

Required setup:

The following actions must be performed if the virtual cluster ID is supplied from the task input. Otherwise, if it is supplied statically in the state machine definition, these actions will be done automatically.

The job can be configured with spark submit parameters:

tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
	VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
	ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
	JobDriver: &JobDriver{
		SparkSubmitJobDriver: &SparkSubmitJobDriver{
			EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
			SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
		},
	},
})

Configuring the job can also be done via application configuration:

tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
	VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
	ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
	JobName: jsii.String("EMR-Containers-Job"),
	JobDriver: &JobDriver{
		SparkSubmitJobDriver: &SparkSubmitJobDriver{
			EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
		},
	},
	ApplicationConfig: []applicationConfiguration{
		&applicationConfiguration{
			Classification: tasks.Classification_SPARK_DEFAULTS(),
			Properties: map[string]*string{
				"spark.executor.instances": jsii.String("1"),
				"spark.executor.memory": jsii.String("512M"),
			},
		},
	},
})

Job monitoring can be enabled if monitoring.logging is set true. This automatically generates an S3 bucket and CloudWatch logs.

tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
	VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
	ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
	JobDriver: &JobDriver{
		SparkSubmitJobDriver: &SparkSubmitJobDriver{
			EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
			SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
		},
	},
	Monitoring: &Monitoring{
		Logging: jsii.Boolean(true),
	},
})

Otherwise, providing monitoring for jobs with existing log groups and log buckets is also available.

import logs "github.com/aws/aws-cdk-go/awscdk"


logGroup := logs.NewLogGroup(this, jsii.String("Log Group"))
logBucket := s3.NewBucket(this, jsii.String("S3 Bucket"))

tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
	VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
	ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
	JobDriver: &JobDriver{
		SparkSubmitJobDriver: &SparkSubmitJobDriver{
			EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
			SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
		},
	},
	Monitoring: &Monitoring{
		LogGroup: logGroup,
		LogBucket: logBucket,
	},
})

Users can provide their own existing Job Execution Role.

tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
	VirtualCluster: tasks.VirtualClusterInput_FromTaskInput(sfn.TaskInput_FromJsonPathAt(jsii.String("$.VirtualClusterId"))),
	ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
	JobName: jsii.String("EMR-Containers-Job"),
	ExecutionRole: iam.Role_FromRoleArn(this, jsii.String("Job-Execution-Role"), jsii.String("arn:aws:iam::xxxxxxxxxxxx:role/JobExecutionRole")),
	JobDriver: &JobDriver{
		SparkSubmitJobDriver: &SparkSubmitJobDriver{
			EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
			SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
		},
	},
})

EKS

Step Functions supports Amazon EKS through the service integration pattern. The service integration APIs correspond to Amazon EKS APIs.

Read more about the differences when using these service integrations.

Call

Read and write Kubernetes resource objects via a Kubernetes API endpoint. Corresponds to the call API in Step Functions Connector.

The following code snippet includes a Task state that uses eks:call to list the pods.

import "github.com/aws/aws-cdk-go/awscdk"


myEksCluster := eks.NewCluster(this, jsii.String("my sample cluster"), &ClusterProps{
	Version: eks.KubernetesVersion_V1_18(),
	ClusterName: jsii.String("myEksCluster"),
})

tasks.NewEksCall(this, jsii.String("Call a EKS Endpoint"), &EksCallProps{
	Cluster: myEksCluster,
	HttpMethod: tasks.HttpMethods_GET,
	HttpPath: jsii.String("/api/v1/namespaces/default/pods"),
})

EventBridge

Step Functions supports Amazon EventBridge through the service integration pattern. The service integration APIs correspond to Amazon EventBridge APIs.

Read more about the differences when using these service integrations.

Put Events

Send events to an EventBridge bus. Corresponds to the put-events API in Step Functions Connector.

The following code snippet includes a Task state that uses events:putevents to send an event to the default bus.

import events "github.com/aws/aws-cdk-go/awscdk"


myEventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{
	EventBusName: jsii.String("MyEventBus1"),
})

tasks.NewEventBridgePutEvents(this, jsii.String("Send an event to EventBridge"), &EventBridgePutEventsProps{
	Entries: []eventBridgePutEventsEntry{
		&eventBridgePutEventsEntry{
			Detail: sfn.TaskInput_FromObject(map[string]interface{}{
				"Message": jsii.String("Hello from Step Functions!"),
			}),
			EventBus: myEventBus,
			DetailType: jsii.String("MessageFromStepFunctions"),
			Source: jsii.String("step.functions"),
		},
	},
})

Glue

Step Functions supports AWS Glue through the service integration pattern.

You can call the StartJobRun API from a Task state.

tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{
	GlueJobName: jsii.String("my-glue-job"),
	Arguments: sfn.TaskInput_FromObject(map[string]interface{}{
		"key": jsii.String("value"),
	}),
	Timeout: awscdk.Duration_Minutes(jsii.Number(30)),
	NotifyDelayAfter: awscdk.Duration_*Minutes(jsii.Number(5)),
})

Glue DataBrew

Step Functions supports AWS Glue DataBrew through the service integration pattern.

You can call the StartJobRun API from a Task state.

tasks.NewGlueDataBrewStartJobRun(this, jsii.String("Task"), &GlueDataBrewStartJobRunProps{
	Name: jsii.String("databrew-job"),
})

Lambda

Invoke a Lambda function.

You can specify the input to your Lambda function through the payload attribute. By default, Step Functions invokes Lambda function with the state input (JSON path '$') as the input.

The following snippet invokes a Lambda Function with the state input as the payload by referencing the $ path.

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke with state input"), &LambdaInvokeProps{
	LambdaFunction: fn,
})

When a function is invoked, the Lambda service sends these response elements back.

⚠️ The response from the Lambda function is in an attribute called Payload

The following snippet invokes a Lambda Function by referencing the $.Payload path to reference the output of a Lambda executed before it.

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke with empty object as payload"), &LambdaInvokeProps{
	LambdaFunction: fn,
	Payload: sfn.TaskInput_FromObject(map[string]interface{}{
	}),
})

// use the output of fn as input
// use the output of fn as input
tasks.NewLambdaInvoke(this, jsii.String("Invoke with payload field in the state input"), &LambdaInvokeProps{
	LambdaFunction: fn,
	Payload: sfn.TaskInput_FromJsonPathAt(jsii.String("$.Payload")),
})

The following snippet invokes a Lambda and sets the task output to only include the Lambda function response.

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke and set function response as task output"), &LambdaInvokeProps{
	LambdaFunction: fn,
	OutputPath: jsii.String("$.Payload"),
})

If you want to combine the input and the Lambda function response you can use the payloadResponseOnly property and specify the resultPath. This will put the Lambda function ARN directly in the "Resource" string, but it conflicts with the integrationPattern, invocationType, clientContext, and qualifier properties.

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke and combine function response with task input"), &LambdaInvokeProps{
	LambdaFunction: fn,
	PayloadResponseOnly: jsii.Boolean(true),
	ResultPath: jsii.String("$.fn"),
})

You can have Step Functions pause a task, and wait for an external process to return a task token. Read more about the callback pattern

To use the callback pattern, set the token property on the task. Call the Step Functions SendTaskSuccess or SendTaskFailure APIs with the token to indicate that the task has completed and the state machine should resume execution.

The following snippet invokes a Lambda with the task token as part of the input to the Lambda.

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke with callback"), &LambdaInvokeProps{
	LambdaFunction: fn,
	IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
	Payload: sfn.TaskInput_FromObject(map[string]interface{}{
		"token": sfn.JsonPath_taskToken(),
		"input": sfn.JsonPath_stringAt(jsii.String("$.someField")),
	}),
})

⚠️ The task will pause until it receives that task token back with a SendTaskSuccess or SendTaskFailure call. Learn more about Callback with the Task Token.

AWS Lambda can occasionally experience transient service errors. In this case, invoking Lambda results in a 500 error, such as ServiceException, AWSLambdaException, or SdkClientException. As a best practice, the LambdaInvoke task will retry on those errors with an interval of 2 seconds, a back-off rate of 2 and 6 maximum attempts. Set the retryOnServiceExceptions prop to false to disable this behavior.

SageMaker

Step Functions supports AWS SageMaker through the service integration pattern.

If your training job or model uses resources from AWS Marketplace, network isolation is required. To do so, set the enableNetworkIsolation property to true for SageMakerCreateModel or SageMakerCreateTrainingJob.

To set environment variables for the Docker container use the environment property.

Create Training Job

You can call the CreateTrainingJob API from a Task state.

tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{
	TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")),
	AlgorithmSpecification: &AlgorithmSpecification{
		AlgorithmName: jsii.String("BlazingText"),
		TrainingInputMode: tasks.InputMode_FILE,
	},
	InputDataConfig: []channel{
		&channel{
			ChannelName: jsii.String("train"),
			DataSource: &DataSource{
				S3DataSource: &S3DataSource{
					S3DataType: tasks.S3DataType_S3_PREFIX,
					S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")),
				},
			},
		},
	},
	OutputDataConfig: &OutputDataConfig{
		S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("mybucket")), jsii.String("myoutputpath")),
	},
	ResourceConfig: &ResourceConfig{
		InstanceCount: jsii.Number(1),
		InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))),
		VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)),
	},
	 // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
	StoppingCondition: &StoppingCondition{
		MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)),
	},
})

Create Transform Job

You can call the CreateTransformJob API from a Task state.

tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{
	TransformJobName: jsii.String("MyTransformJob"),
	ModelName: jsii.String("MyModelName"),
	ModelClientOptions: &ModelClientOptions{
		InvocationsMaxRetries: jsii.Number(3),
		 // default is 0
		InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)),
	},
	TransformInput: &TransformInput{
		TransformDataSource: &TransformDataSource{
			S3DataSource: &TransformS3DataSource{
				S3Uri: jsii.String("s3://inputbucket/train"),
				S3DataType: tasks.S3DataType_S3_PREFIX,
			},
		},
	},
	TransformOutput: &TransformOutput{
		S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"),
	},
	TransformResources: &TransformResources{
		InstanceCount: jsii.Number(1),
		InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE),
	},
})

Create Endpoint

You can call the CreateEndpoint API from a Task state.

tasks.NewSageMakerCreateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerCreateEndpointProps{
	EndpointName: sfn.JsonPath_StringAt(jsii.String("$.EndpointName")),
	EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.EndpointConfigName")),
})

Create Endpoint Config

You can call the CreateEndpointConfig API from a Task state.

tasks.NewSageMakerCreateEndpointConfig(this, jsii.String("SagemakerEndpointConfig"), &SageMakerCreateEndpointConfigProps{
	EndpointConfigName: jsii.String("MyEndpointConfig"),
	ProductionVariants: []productionVariant{
		&productionVariant{
			InitialInstanceCount: jsii.Number(2),
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M5, ec2.InstanceSize_XLARGE),
			ModelName: jsii.String("MyModel"),
			VariantName: jsii.String("awesome-variant"),
		},
	},
})

Create Model

You can call the CreateModel API from a Task state.

tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{
	ModelName: jsii.String("MyModel"),
	PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{
		Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))),
		Mode: tasks.Mode_SINGLE_MODEL,
		ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")),
	}),
})

Update Endpoint

You can call the UpdateEndpoint API from a Task state.

tasks.NewSageMakerUpdateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerUpdateEndpointProps{
	EndpointName: sfn.JsonPath_StringAt(jsii.String("$.Endpoint.Name")),
	EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.Endpoint.EndpointConfig")),
})

SNS

Step Functions supports Amazon SNS through the service integration pattern.

You can call the Publish API from a Task state to publish to an SNS topic.

topic := sns.NewTopic(this, jsii.String("Topic"))

// Use a field from the execution data as message.
task1 := tasks.NewSnsPublish(this, jsii.String("Publish1"), &SnsPublishProps{
	Topic: Topic,
	IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE,
	Message: sfn.TaskInput_FromDataAt(jsii.String("$.state.message")),
	MessageAttributes: map[string]messageAttribute{
		"place": &messageAttribute{
			"value": sfn.JsonPath_stringAt(jsii.String("$.place")),
		},
		"pic": &messageAttribute{
			// BINARY must be explicitly set
			"dataType": tasks.MessageAttributeDataType_BINARY,
			"value": sfn.JsonPath_stringAt(jsii.String("$.pic")),
		},
		"people": &messageAttribute{
			"value": jsii.Number(4),
		},
		"handles": &messageAttribute{
			"value": []interface{}{
				jsii.String("@kslater"),
				jsii.String("@jjf"),
				nil,
				jsii.String("@mfanning"),
			},
		},
	},
})

// Combine a field from the execution data with
// a literal object.
task2 := tasks.NewSnsPublish(this, jsii.String("Publish2"), &SnsPublishProps{
	Topic: Topic,
	Message: sfn.TaskInput_FromObject(map[string]interface{}{
		"field1": jsii.String("somedata"),
		"field2": sfn.JsonPath_stringAt(jsii.String("$.field2")),
	}),
})

Step Functions

Start Execution

You can manage AWS Step Functions executions.

AWS Step Functions supports it's own StartExecution API as a service integration.

// Define a state machine with one Pass state
child := sfn.NewStateMachine(this, jsii.String("ChildStateMachine"), &StateMachineProps{
	Definition: sfn.Chain_Start(sfn.NewPass(this, jsii.String("PassState"))),
})

// Include the state machine in a Task state with callback pattern
task := tasks.NewStepFunctionsStartExecution(this, jsii.String("ChildTask"), &StepFunctionsStartExecutionProps{
	StateMachine: child,
	IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
	Input: sfn.TaskInput_FromObject(map[string]interface{}{
		"token": sfn.JsonPath_taskToken(),
		"foo": jsii.String("bar"),
	}),
	Name: jsii.String("MyExecutionName"),
})

// Define a second state machine with the Task state above
// Define a second state machine with the Task state above
sfn.NewStateMachine(this, jsii.String("ParentStateMachine"), &StateMachineProps{
	Definition: task,
})

You can utilize Associate Workflow Executions via the associateWithParent property. This allows the Step Functions UI to link child executions from parent executions, making it easier to trace execution flow across state machines.

var child stateMachine

task := tasks.NewStepFunctionsStartExecution(this, jsii.String("ChildTask"), &StepFunctionsStartExecutionProps{
	StateMachine: child,
	AssociateWithParent: jsii.Boolean(true),
})

This will add the payload AWS_STEP_FUNCTIONS_STARTED_BY_EXECUTION_ID.$: $$.Execution.Id to the inputproperty for you, which will pass the execution ID from the context object to the execution input. It requires input to be an object or not be set at all.

Invoke Activity

You can invoke a Step Functions Activity which enables you to have a task in your state machine where the work is performed by a worker that can be hosted on Amazon EC2, Amazon ECS, AWS Lambda, basically anywhere. Activities are a way to associate code running somewhere (known as an activity worker) with a specific task in a state machine.

When Step Functions reaches an activity task state, the workflow waits for an activity worker to poll for a task. An activity worker polls Step Functions by using GetActivityTask, and sending the ARN for the related activity.

After the activity worker completes its work, it can provide a report of its success or failure by using SendTaskSuccess or SendTaskFailure. These two calls use the taskToken provided by GetActivityTask to associate the result with that task.

The following example creates an activity and creates a task that invokes the activity.

submitJobActivity := sfn.NewActivity(this, jsii.String("SubmitJob"))

tasks.NewStepFunctionsInvokeActivity(this, jsii.String("Submit Job"), &StepFunctionsInvokeActivityProps{
	Activity: submitJobActivity,
})

SQS

Step Functions supports Amazon SQS

You can call the SendMessage API from a Task state to send a message to an SQS queue.

queue := sqs.NewQueue(this, jsii.String("Queue"))

// Use a field from the execution data as message.
task1 := tasks.NewSqsSendMessage(this, jsii.String("Send1"), &SqsSendMessageProps{
	Queue: Queue,
	MessageBody: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")),
})

// Combine a field from the execution data with
// a literal object.
task2 := tasks.NewSqsSendMessage(this, jsii.String("Send2"), &SqsSendMessageProps{
	Queue: Queue,
	MessageBody: sfn.TaskInput_FromObject(map[string]interface{}{
		"field1": jsii.String("somedata"),
		"field2": sfn.JsonPath_stringAt(jsii.String("$.field2")),
	}),
})

# Functions

No description provided by the author
No description provided by the author
Custom AcceleratorType.
AcceleratorType.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Reference a Docker image that is provided as an Asset in the current app.
Reference a Docker image stored in an ECR repository.
Reference a Docker image which URI is obtained from the task's input.
Reference a Docker image by it's URI.
Sets an attribute of type Boolean from state input through Json path.
Sets an attribute of type Binary.
Sets an attribute of type Binary Set.
Sets an attribute of type Boolean.
Sets an attribute of type List.
Sets an attribute of type Map.
Sets an attribute of type Null.
Sets a literal number.
Sets an attribute of type Number Set.
Sets an attribute of type String.
Sets an attribute of type String Set.
Sets an attribute of type List.
Sets an attribute of type Map.
Sets an attribute of type Number.
Sets an attribute of type Number Set.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Specify an existing EKS Cluster as the name for this Cluster.
Specify a Task Input as the name for this Cluster.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Creates a new Classification.
Creates a new Classification.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Deprecated: No replacement.
Deprecated: No replacement.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Deprecated: use `StepFunctionsInvokeActivity`.
Deprecated: use `StepFunctionsInvokeActivity`.
Deprecated: Use `LambdaInvoke`.
Deprecated: Use `LambdaInvoke`.
Experimental.
Experimental.
Deprecated: Use `SnsPublish`.
Deprecated: Use `SnsPublish`.
Initializes the label string.
Initializes the label string.
Deprecated: use `BatchSubmitJob`.
Deprecated: use `BatchSubmitJob`.
Deprecated: - replaced by `EcsRunTask`.
Deprecated: - replaced by `EcsRunTask`.
Deprecated: replaced by `EcsRunTask`.
Deprecated: replaced by `EcsRunTask`.
Deprecated: use `GlueStartJobRun`.
Deprecated: use `GlueStartJobRun`.
Deprecated: Use `LambdaInvoke`.
Deprecated: Use `LambdaInvoke`.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Experimental.
Deprecated: Use `SqsSendMessage`.
Deprecated: Use `SqsSendMessage`.
Experimental.
Experimental.
Experimental.
Experimental.
Deprecated: - use 'StepFunctionsStartExecution'.
Deprecated: - use 'StepFunctionsStartExecution'.
Experimental.
Experimental.
Experimental.
Experimental.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
An `IS3Location` built with a determined bucket and key prefix.
An `IS3Location` determined fully by a JSON Path from the task input.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Return only the states that allow chaining from an array of states.
Find the set of end states states reachable through transitions from the given start state.
Find the set of states reachable through transitions from the given start state.
Return whether the given object is a Construct.
Add a prefix to the stateId of all States found in a construct tree.
Input for a virtualClusterId from a Task Input.
Input for virtualClusterId from a literal string.

# Constants

Cancel Step execution and enter WAITING state.
Continue to the next Step.
Terminate the Cluster on Step Failure.
Add a newline character at the end of every transformed record.
Concatenate the results in binary format.
Use the IAM role associated with the current state machine for authorization.
Call the API direclty with no authorization method.
Use the resource policy of the API for authorization.
Fits multiple records in a mini-batch.
Use a single record when making an invocation request.
Gzip compression type.
None compression type.
The response includes the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity for each table and secondary index that was accessed.
No ConsumedCapacity details are included in the response.
The response includes only the aggregate ConsumedCapacity for the operation.
If set to NONE, no statistics are returned.
If set to SIZE, the response includes statistics about item collections, if any, that were modified during the operation.
Returns all of the attributes of the item.
Returns all of the attributes of the item.
Nothing is returned.
Returns only the updated attributes.
Returns only the updated attributes.
GREATER_THAN.
GREATER_THAN_OR_EQUAL.
LESS_THAN.
LESS_THAN_OR_EQUAL.
AVERAGE.
MAXIMUM.
MINIMUM.
SAMPLE_COUNT.
SUM.
BITS.
BITS_PER_SECOND.
BYTES.
BYTES_PER_SECOND.
COUNT.
COUNT_PER_SECOND.
GIGA_BITS.
GIGA_BITS_PER_SECOND.
GIGA_BYTES.
GIGA_BYTES_PER_SECOND.
KILO_BITS.
KILO_BITS_PER_SECOND.
KILO_BYTES.
KILO_BYTES_PER_SECOND.
MEGA_BITS.
MEGA_BITS_PER_SECOND.
MEGA_BYTES.
MEGA_BYTES_PER_SECOND.
MICRO_SECONDS.
MILLI_SECONDS.
NONE.
PERCENT.
SECONDS.
TERA_BITS.
TERA_BITS_PER_SECOND.
TERA_BYTES.
TERA_BYTES_PER_SECOND.
gp2 Volume Type.
io1 Volume Type.
Standard Volume Type.
Indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted.
Indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary.
On Demand Instance.
Spot Instance.
Core Node.
Master Node.
Task Node.
CHANGE_IN_CAPACITY.
EXACT_CAPACITY.
PERCENT_CHANGE_IN_CAPACITY.
Capacity-optimized, which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.
SWITCH_TO_ON_DEMAND.
TERMINATE_CLUSTER.
Client-side encryption (CSE) with an AWS KMS key managed by the account owner.
Server-side encryption (SSE) with an AWS KMS key managed by the account owner.
Server side encryption (SSE) with an Amazon S3-managed key.
Delete the resource at the specified endpoint.
Retreive data from a server at the specified resource.
Retreive data from a server at the specified resource without the response body.
Return data describing what other methods and operations the server supports.
Apply partial modifications to the resource.
HttpMethod_POST
Send data to the API endpoint to create or udpate a resource.
Send data to the API endpoint to update or create a resource.
Delete the resource at the specified endpoint.
Retrieve data from a server at the specified resource.
Retrieve data from a server at the specified resource without the response body.
Apply partial modifications to the resource.
HttpMethods_POST
Send data to the API endpoint to create or update a resource.
Send data to the API endpoint to update or create a resource.
File mode.
Pipe mode.
TValidate parameter values and verify that the user or role has permission to invoke the function.
Invoke asynchronously.
Invoke synchronously.
Validate parameter values and verify that the user or role has permission to invoke the function.
Invoke the function asynchronously.
Invoke the function synchronously.
Binary type attributes can store any binary data.
Numbers are positive or negative integers or floating-point numbers.
Strings are Unicode with UTF-8 binary encoding.
An array, formatted as a string.
Container hosts multiple models.
Container hosts a single model.
None record wrapper type.
RecordIO record wrapper type.
Fully replicated S3 Data Distribution Type.
Sharded By S3 Key Data Distribution Type.
Augmented Manifest File Data Type.
Manifest File Data Type.
S3 Prefix Data Type.
Split records on a newline character boundary.
Input data files are not split,.
Split using MXNet RecordIO format.
Split using TensorFlow TFRecord format.

# Structs

Specify the training algorithm and algorithm-specific metadata.
A configuration specification to be used when provisioning virtual clusters, which can include configurations for applications and software bundled with Amazon EMR on EKS.
Properties for getting a Query Execution.
Properties for getting a Query Results.
Properties for starting a Query Execution.
Properties for stoping a Query Execution.
The overrides that should be sent to a container.
An object representing an AWS Batch job dependency.
Properties for RunBatchJob.
Base CallApiGatewayEdnpoint Task Props.
Properties for calling an HTTP API Endpoint.
Properties for calling an REST API Endpoint.
Properties for calling an AWS service's API action from your state machine.
Describes the training, validation or test dataset and the Amazon S3 location where it is stored.
Properties for CodeBuildStartBuild.
Basic properties for ECS Tasks.
Configuration options for the ContainerDefinition.
Properties to define a ContainerDefinition.
A list of container overrides that specify the name of a container and the overrides it should receive.
The overrides that should be sent to a container.
Location of the channel data.
Configuration for a using Docker image.
Properties for DynamoDeleteItem Task.
Properties for DynamoGetItem Task.
Properties for DynamoPutItem Task.
Properties for DynamoUpdateItem Task.
Options to run an ECS task on EC2 in StepFunctions and ECS.
Properties to define an ECS service.
Configuration options for the ECS launch type.
Construction properties for the BaseRunTaskProps.
Properties for ECS Tasks.
Properties for calling a EKS endpoint with EksCall.
Properties for EmrAddStep.
Properties for EmrCancelStep.
Properties to define a EMR Containers CreateVirtualCluster Task on an EKS cluster.
Properties to define a EMR Containers DeleteVirtualCluster Task.
The props for a EMR Containers StartJobRun Task.
Properties for the EMR Cluster Applications.
An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster.
Configuration of a bootstrap action.
The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered.
An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR.
Configuration of requested EBS block device associated with the instance group with count of volumes that will be associated to every instance.
The Amazon EBS configuration of a cluster instance.
The configuration that defines an instance fleet.
The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.
Configuration defining a new instance group.
A specification of the number and type of Amazon EC2 instances.
An instance type configuration for each instance type in an instance fleet, which determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
A CloudWatch dimension, which is specified using a Key (known as a Name in CloudWatch), Value pair.
The Amazon EC2 Availability Zone configuration of the cluster (job flow).
The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
The upper and lower EC2 instance limits for an automatic scaling policy.
A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments.
The conditions that trigger an automatic scaling activity and the definition of a CloudWatch metric alarm.
Configuration of the script to run during a bootstrap action.
An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
The launch specification for Spot instances in the instance fleet, which determines the defined duration and provisioning timeout behavior.
EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.
Properties for EmrCreateCluster.
Properties for EmrModifyInstanceFleetByName.
Modify the size or configurations of an instance group.
Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.
Policy for customizing shrink operations.
Properties for EmrModifyInstanceGroupByName.
Properties for EmrSetClusterTerminationProtection.
Properties for EmrTerminateCluster.
Encryption Configuration of the S3 bucket.
Properties for EvaluateExpression.
An entry to be sent to EventBridge.
Properties for sending events with PutEvents.
Properties for starting a job run with StartJobRun.
Properties for starting an AWS Glue job as a task.
Properties for FunctionTask.
Properties for InvokeFunction.
An object representing an AWS Batch job dependency.
Specify the driver that the EMR Containers job runs on.
Properties for invoking a Lambda function with LambdaInvoke.
Options for binding a launch target to an ECS run job task.
A message attribute to add to the SNS message.
Specifies the metric name and regular expressions used to parse algorithm logs.
Configures the timeout and maximum number of retries for processing a transform job invocation.
Configuration setting for monitoring.
Configures the S3 bucket where SageMaker will save the result of model training.
Identifies a model that you want to host and the resources to deploy for hosting it.
Properties for PublishTask.
Database and data catalog context in which the query execution occurs.
Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
Location of query result along with S3 bucket configuration.
Properties for RunBatchJob.
Properties to run an ECS task on EC2 in StepFunctionsan ECS.
Properties to define an ECS service.
Properties for RunGlueJobTask.
Properties for RunLambdaTask.
S3 location of the channel data.
Options for binding an S3 Location.
Stores information about the location of an object in Amazon S3.
Properties for creating an Amazon SageMaker endpoint configuration.
Properties for creating an Amazon SageMaker endpoint.
Properties for creating an Amazon SageMaker model.
Properties for creating an Amazon SageMaker training job.
Properties for creating an Amazon SageMaker transform job task.
Properties for updating Amazon SageMaker endpoint.
Properties for SendMessageTask.
Configuration for a shuffle option for input data in a channel.
Properties for publishing a message to an SNS topic.
The information about job driver for Spark submit.
Properties for sending a message to an SQS queue.
Properties for StartExecution.
Properties for invoking an Activity worker.
Properties for StartExecution.
Specifies a limit to how long a model training job can run.
An environment variable to be set in the container run as a task.
S3 location of the input data that the model can consume.
Dataset to be transformed and the Amazon S3 location where it is stored.
S3 location where you want Amazon SageMaker to save the results from the transform job.
ML compute instances for the transform job.
Location of the channel data.
Specifies the VPC that you want your Amazon SageMaker training job to connect to.

# Interfaces

The generation of Elastic Inference (EI) instance.
The size of the Elastic Inference (EI) instance to use for the production variant.
Get an Athena Query Execution as a Task.
Get an Athena Query Results as a Task.
Start an Athena Query as a Task.
Stop an Athena Query Execution as a Task.
Task to submits an AWS Batch job from a job definition.
Call HTTP API endpoint as a Task.
Call REST API endpoint as a Task.
A StepFunctions task to call an AWS service API.
The classification within a EMR Containers application configuration.
Start a CodeBuild Build as a task.
Describes the container, as part of model definition.
Creates `IDockerImage` instances.
Represents the data for an attribute.
A StepFunctions task to call DynamoDeleteItem.
A StepFunctions task to call DynamoGetItem.
Class to generate projection expression.
A StepFunctions task to call DynamoPutItem.
A StepFunctions task to call DynamoUpdateItem.
Configuration for running an ECS task on EC2.
Configuration for running an ECS task on Fargate.
Run a Task on ECS or Fargate.
A StepFunctions Task to run a Task on ECS or Fargate.
Call a EKS endpoint as a Task.
Class that supports methods which return the EKS cluster name depending on input type.
A Step Functions Task to add a Step to an EMR Cluster.
A Step Functions Task to to cancel a Step on an EMR Cluster.
Task that creates an EMR Containers virtual cluster from an EKS cluster.
Deletes an EMR Containers virtual cluster as a Task.
Starts a job run.
A Step Functions Task to create an EMR Cluster.
A Step Functions Task to to modify an InstanceFleet on an EMR Cluster.
A Step Functions Task to to modify an InstanceGroup on an EMR Cluster.
A Step Functions Task to to set Termination Protection on an EMR Cluster.
A Step Functions Task to terminate an EMR Cluster.
A Step Functions Task to evaluate an expression.
A StepFunctions Task to send events to an EventBridge event bus.
Start a Job run as a Task.
Starts an AWS Glue job in a Task state.
Configuration of the container used to host the model.
An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted.
A Step Functions Task to invoke an Activity worker.
A Step Functions Task to invoke a Lambda function.
Task to train a machine learning model using Amazon SageMaker.
Invoke a Lambda function as a Task.
A Step Functions Task to publish messages to SNS topic.
The Amazon EMR release version to use for the job run.
A Step Functions Task to run AWS Batch.
Run an ECS/EC2 Task in a StepFunctions workflow.
Start a service on an ECS cluster.
Invoke a Glue job as a Task.
Invoke a Lambda function as a Task.
Constructs `IS3Location` objects.
A Step Functions Task to create a SageMaker endpoint.
A Step Functions Task to create a SageMaker endpoint configuration.
A Step Functions Task to create a SageMaker model.
Class representing the SageMaker Create Training Job task.
Class representing the SageMaker Create Transform Job task.
A Step Functions Task to update a SageMaker endpoint.
A StepFunctions Task to send messages to SQS queue.
A Step Functions Task to publish messages to SNS topic.
A StepFunctions Task to send messages to SQS queue.
A Step Functions Task to call StartExecution on another state machine.
A Step Functions Task to invoke an Activity worker.
A Step Functions Task to call StartExecution on another state machine.
Class that returns a virtual cluster's id depending on input type.

# Type aliases

The action to take when the cluster step fails.
How to assemble the results of the transform job as a single S3 object.
The authentication method used to call the endpoint.
Specifies the number of records to include in a mini-batch for an HTTP inference request.
Compression type of the data.
Determines the level of detail about provisioned throughput consumption that is returned.
Determines whether item collection metrics are returned.
Use ReturnValues if you want to get the item attributes as they appear before or after they are changed.
CloudWatch Alarm Comparison Operators.
CloudWatch Alarm Statistics.
CloudWatch Alarm Units.
EBS Volume Types.
The Cluster ScaleDownBehavior specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.
EC2 Instance Market.
Instance Role Types.
AutoScaling Adjustment Type.
Spot Allocation Strategies.
Spot Timeout Actions.
Encryption Options of the S3 bucket.
Http Methods that API Gateway supports.
Method type of a EKS call.
Input mode that the algorithm supports.
Invocation type of a Lambda.
Invocation type of a Lambda.
The data type set for the SNS message attributes.
Specifies how many models the container hosts.
Define the format of the input data.
S3 Data Distribution Type.
S3 Data Type.
Method to use to split the transform job's data files into smaller batches.