package
2.166.0
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 contains a collection of classes that allow you to call various AWS services from your Step Functions state machine.

Be sure to familiarize yourself with the aws-stepfunctions module documentation first.

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

Table Of Contents

Paths

Learn more about input and output processing in Step Functions here

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_LATEST(),
	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"),
})

Use the additionalIamStatements prop to pass additional IAM statements that will be added to the state machine role's policy. Use it in the case where the call requires more than a single statement to be executed:

detectLabels := tasks.NewCallAwsService(this, jsii.String("DetectLabels"), &CallAwsServiceProps{
	Service: jsii.String("rekognition"),
	Action: jsii.String("detectLabels"),
	IamResources: []*string{
		jsii.String("*"),
	},
	AdditionalIamStatements: []policyStatement{
		iam.NewPolicyStatement(&PolicyStatementProps{
			Actions: []*string{
				jsii.String("s3:getObject"),
			},
			Resources: []*string{
				jsii.String("arn:aws:s3:::amzn-s3-demo-bucket/*"),
			},
		}),
	},
})

Cross-region AWS API call

You can call AWS API in a different region from your state machine by using the CallAwsServiceCrossRegion construct. In addition to the properties for CallAwsService construct, you have to set region property to call the API.

var myBucket bucket

getObject := tasks.NewCallAwsServiceCrossRegion(this, jsii.String("GetObject"), &CallAwsServiceCrossRegionProps{
	Region: jsii.String("ap-northeast-1"),
	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("*")),
	},
})

Other properties such as additionalIamStatements can be used in the same way as the CallAwsService task.

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("amzn-s3-demo-bucket"),
			ObjectKey: jsii.String("folder"),
		},
	},
	ExecutionParameters: []*string{
		jsii.String("param1"),
		jsii.String("param2"),
	},
})

You can reuse the query results by setting the resultReuseConfigurationMaxAge property.

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"),
		},
	},
	ExecutionParameters: []*string{
		jsii.String("param1"),
		jsii.String("param2"),
	},
	ResultReuseConfigurationMaxAge: awscdk.Duration_Minutes(jsii.Number(100)),
})

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 ecsJobDefinition
var batchQueue jobQueue


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

Bedrock

Step Functions supports Bedrock through the service integration pattern.

InvokeModel

The InvokeModel API invokes the specified Bedrock model to run inference using the input provided. The format of the input body and the response body depend on the model selected.

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


model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())

task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{
	Model: Model,
	Body: sfn.TaskInput_FromObject(map[string]interface{}{
		"inputText": jsii.String("Generate a list of five first names."),
		"textGenerationConfig": map[string]*f64{
			"maxTokenCount": jsii.Number(100),
			"temperature": jsii.Number(1),
		},
	}),
	ResultSelector: map[string]interface{}{
		"names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")),
	},
})

Using Input Path for S3 URI

Provide S3 URI as an input or output path to invoke a model

To specify the S3 URI as JSON path to your input or output fields, use props s3InputUri and s3OutputUri under BedrockInvokeModelProps and set feature flag @aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask to true.

If this flag is not enabled, the code will populate the S3Uri using InputPath and OutputPath fields, which is not recommended.

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


model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())

task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{
	Model: Model,
	Input: &BedrockInvokeModelInputProps{
		S3InputUri: sfn.JsonPath_StringAt(jsii.String("$.prompt")),
	},
	Output: &BedrockInvokeModelOutputProps{
		S3OutputUri: sfn.JsonPath_*StringAt(jsii.String("$.prompt")),
	},
})

Using Input Path

Provide S3 URI as an input or output path to invoke a model

Currently, input and output Path provided in the BedrockInvokeModelProps input is defined as S3URI field under task definition of state machine. To modify the existing behaviour, set @aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask to true.

If this feature flag is enabled, S3URI fields will be generated from other Props(s3InputUri and s3OutputUri), and the given inputPath, OutputPath will be rendered as it is in the JSON task definition.

If the feature flag is set to false, the behavior will be to populate the S3Uri using the InputPath and OutputPath fields, which is not recommended.

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


model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())

task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{
	Model: Model,
	InputPath: sfn.JsonPath_StringAt(jsii.String("$.prompt")),
	OutputPath: sfn.JsonPath_*StringAt(jsii.String("$.prompt")),
})

You can apply a guardrail to the invocation by setting guardrail.

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


model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())

task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model with guardrail"), &BedrockInvokeModelProps{
	Model: Model,
	Body: sfn.TaskInput_FromObject(map[string]interface{}{
		"inputText": jsii.String("Generate a list of five first names."),
		"textGenerationConfig": map[string]*f64{
			"maxTokenCount": jsii.Number(100),
			"temperature": jsii.Number(1),
		},
	}),
	Guardrail: tasks.Guardrail_Enable(jsii.String("guardrailId"), jsii.Number(1)),
	ResultSelector: map[string]interface{}{
		"names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")),
	},
})

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")),
		},
	},
})

StartBuildBatch

StartBuildBatch starts a batch CodeBuild for a project by project name. It is necessary to enable the batch build feature in the CodeBuild project.

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


project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{
	ProjectName: jsii.String("MyTestProject"),
	BuildSpec: codebuild.BuildSpec_FromObjectToYaml(map[string]interface{}{
		"version": jsii.Number(0.2),
		"batch": map[string][]map[string]*string{
			"build-list": []map[string]*string{
				map[string]*string{
					"identifier": jsii.String("id"),
					"buildspec": jsii.String("version: 0.2\nphases:\n  build:\n    commands:\n      - echo \"Hello, from small!\""),
				},
			},
		},
	}),
})
project.EnableBatchBuilds()

task := tasks.NewCodeBuildStartBuildBatch(this, jsii.String("buildBatchTask"), &CodeBuildStartBuildBatchProps{
	Project: Project,
	IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE,
	EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{
		"test": &buildEnvironmentVariable{
			"type": codebuild.BuildEnvironmentVariableType_PLAINTEXT,
			"value": jsii.String("testValue"),
		},
	},
})

Note: enableBatchBuilds() will do nothing for imported projects. If you are using an imported project, you must ensure that the project is already configured for batch builds.

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")),
		},
	}),
	PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION,
})

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(),
	PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION,
})

Override CPU and Memory Parameter

By setting the property cpu or memoryMiB, you can override the Fargate or EC2 task instance size at runtime.

see: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html

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

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

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

runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
	Cluster: Cluster,
	TaskDefinition: TaskDefinition,
	LaunchTarget: tasks.NewEcsFargateLaunchTarget(),
	Cpu: jsii.String("1024"),
	MemoryMiB: jsii.String("1048"),
})

ECS enable Exec

By setting the property enableExecuteCommand to true, you can enable the ECS Exec feature for the task for either Fargate or EC2 launch types.

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

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(),
	EnableExecuteCommand: jsii.Boolean(true),
})

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,
})

You can use the launch specification for On-Demand and Spot instances in the fleet.

tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
		InstanceFleets: []instanceFleetConfigProperty{
			&instanceFleetConfigProperty{
				InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER,
				LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{
					OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{
						AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE,
					},
				},
			},
		},
	},
	Name: jsii.String("OnDemandCluster"),
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})

tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
		InstanceFleets: []*instanceFleetConfigProperty{
			&instanceFleetConfigProperty{
				InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER,
				LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{
					SpotSpecification: &SpotProvisioningSpecificationProperty{
						AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED,
						TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER,
						Timeout: awscdk.Duration_Minutes(jsii.Number(5)),
					},
				},
			},
		},
	},
	Name: jsii.String("SpotCluster"),
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})

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),
})

If you want to use an auto-termination policy, you can specify the autoTerminationPolicyIdleTimeout property. Specifies the amount of idle time after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
	},
	Name: jsii.String("ClusterName"),
	AutoTerminationPolicyIdleTimeout: awscdk.Duration_Seconds(jsii.Number(100)),
})

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,
})

To specify a custom runtime role use the executionRoleArn property.

Note: The EMR cluster must be created with a security configuration and the runtime role must have a specific trust policy. See this blog post for more details.

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


cfnSecurityConfiguration := emr.NewCfnSecurityConfiguration(this, jsii.String("EmrSecurityConfiguration"), &CfnSecurityConfigurationProps{
	Name: jsii.String("AddStepRuntimeRoleSecConfig"),
	SecurityConfiguration: jSON.parse(jsii.String(`
	    {
	      "AuthorizationConfiguration": {
	          "IAMConfiguration": {
	              "EnableApplicationScopedIAMRole": true,
	              "ApplicationScopedIAMRoleConfiguration":
	                  {
	                      "PropagateSourceIdentity": true
	                  }
	          },
	          "LakeFormationConfiguration": {
	              "AuthorizedSessionTagValue": "Amazon EMR"
	          }
	      }
	    }`)),
})

task := tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
	},
	Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value,
	SecurityConfiguration: cfnSecurityConfiguration.Name,
})

executionRole := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewArnPrincipal(task.clusterRole.RoleArn),
})

executionRole.AssumeRolePolicy.AddStatements(
iam.NewPolicyStatement(&PolicyStatementProps{
	Effect: iam.Effect_ALLOW,
	Principals: []iPrincipal{
		task.clusterRole,
	},
	Actions: []*string{
		jsii.String("sts:SetSourceIdentity"),
	},
}),
iam.NewPolicyStatement(&PolicyStatementProps{
	Effect: iam.Effect_ALLOW,
	Principals: []*iPrincipal{
		task.clusterRole,
	},
	Actions: []*string{
		jsii.String("sts:TagSession"),
	},
	Conditions: map[string]interface{}{
		"StringEquals": map[string]*string{
			"aws:RequestTag/LakeFormationAuthorizedCaller": jsii.String("Amazon EMR"),
		},
	},
}))

tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{
	ClusterId: jsii.String("ClusterId"),
	ExecutionRoleArn: executionRole.RoleArn,
	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.

StartJobRun

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"),
	}),
	TaskTimeout: sfn.Timeout_Duration(awscdk.Duration_Minutes(jsii.Number(30))),
	NotifyDelayAfter: awscdk.Duration_*Minutes(jsii.Number(5)),
})

You can configure workers by setting the workerType and numberOfWorkers properties.

tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{
	GlueJobName: jsii.String("my-glue-job"),
	WorkerConfiguration: &WorkerConfigurationProperty{
		WorkerType: tasks.WorkerType_G_1X,
		 // Worker type
		NumberOfWorkers: jsii.Number(2),
	},
})

You can choose the execution class by setting the executionClass property.

tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{
	GlueJobName: jsii.String("my-glue-job"),
	ExecutionClass: tasks.ExecutionClass_FLEX,
})

StartCrawlerRun

You can call the StartCrawler API from a Task state through AWS SDK service integrations.

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

var myCrawler cfnCrawler


// You can get the crawler name from `crawler.ref`
// You can get the crawler name from `crawler.ref`
tasks.NewGlueStartCrawlerRun(this, jsii.String("Task1"), &GlueStartCrawlerRunProps{
	CrawlerName: myCrawler.ref,
})

// Of course, you can also specify the crawler name directly.
// Of course, you can also specify the crawler name directly.
tasks.NewGlueStartCrawlerRun(this, jsii.String("Task2"), &GlueStartCrawlerRunProps{
	CrawlerName: jsii.String("my-crawler-job"),
})

Glue DataBrew

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

Start Job Run

You can call the StartJobRun API from a Task state.

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

Invoke HTTP API

Step Functions supports calling third-party APIs with credentials managed by Amazon EventBridge Connections.

The following snippet creates a new API destination connection, and uses it to make a POST request to the specified URL. The endpoint response is available at the $.ResponseBody path.

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


connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{
	Authorization: events.Authorization_Basic(jsii.String("username"), awscdk.SecretValue_UnsafePlainText(jsii.String("password"))),
})

tasks.NewHttpInvoke(this, jsii.String("Invoke HTTP API"), &HttpInvokeProps{
	ApiRoot: jsii.String("https://api.example.com"),
	ApiEndpoint: sfn.TaskInput_FromText(jsii.String("path/to/resource")),
	Body: sfn.TaskInput_FromObject(map[string]interface{}{
		"foo": jsii.String("bar"),
	}),
	Connection: Connection,
	Headers: sfn.TaskInput_*FromObject(map[string]interface{}{
		"Content-Type": jsii.String("application/json"),
	}),
	Method: sfn.TaskInput_*FromText(jsii.String("POST")),
	QueryStringParameters: sfn.TaskInput_*FromObject(map[string]interface{}{
		"id": jsii.String("123"),
	}),
	UrlEncodingFormat: tasks.URLEncodingFormat_BRACKETS,
})

Lambda

Step Functions supports AWS Lambda through the service integration pattern.

Invoke

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 ClientExecutionTimeoutException, 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.

MediaConvert

Step Functions supports AWS MediaConvert through the Optimized integration pattern.

CreateJob

The CreateJob API creates a new transcoding job. For information about jobs and job settings, see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html

You can call the CreateJob API from a Task state. Optionally you can specify the integrationPattern.

Make sure you update the required fields - Role & Settings and refer CreateJobRequest for all other optional parameters.

tasks.NewMediaConvertCreateJob(this, jsii.String("CreateJob"), &MediaConvertCreateJobProps{
	CreateJobRequest: map[string]interface{}{
		"Role": jsii.String("arn:aws:iam::123456789012:role/MediaConvertRole"),
		"Settings": map[string][]map[string]interface{}{
			"OutputGroups": []map[string]interface{}{
				map[string]interface{}{
					"Outputs": []map[string]interface{}{
						map[string]interface{}{
							"ContainerSettings": map[string]*string{
								"Container": jsii.String("MP4"),
							},
							"VideoDescription": map[string]map[string]interface{}{
								"CodecSettings": map[string]interface{}{
									"Codec": jsii.String("H_264"),
									"H264Settings": map[string]interface{}{
										"MaxBitrate": jsii.Number(1000),
										"RateControlMode": jsii.String("QVBR"),
										"SceneChangeDetect": jsii.String("TRANSITION_DETECTION"),
									},
								},
							},
							"AudioDescriptions": []map[string]map[string]interface{}{
								map[string]map[string]interface{}{
									"CodecSettings": map[string]interface{}{
										"Codec": jsii.String("AAC"),
										"AacSettings": map[string]interface{}{
											"Bitrate": jsii.Number(96000),
											"CodingMode": jsii.String("CODING_MODE_2_0"),
											"SampleRate": jsii.Number(48000),
										},
									},
								},
							},
						},
					},
					"OutputGroupSettings": map[string]interface{}{
						"Type": jsii.String("FILE_GROUP_SETTINGS"),
						"FileGroupSettings": map[string]*string{
							"Destination": jsii.String("s3://EXAMPLE-DESTINATION-BUCKET/"),
						},
					},
				},
			},
			"Inputs": []map[string]interface{}{
				map[string]interface{}{
					"AudioSelectors": map[string]map[string]*string{
						"Audio Selector 1": map[string]*string{
							"DefaultSelection": jsii.String("DEFAULT"),
						},
					},
					"FileInput": jsii.String("s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE"),
				},
			},
		},
	},
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})

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("amzn-s3-demo-bucket")), 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)),
	},
})

You can specify TrainingInputMode via the trainingInputMode property.

  • To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, choose InputMode.FILE if an algorithm supports it.
  • To stream data directly from Amazon S3 to the container, choose InputMode.PIPE if an algorithm supports it.
  • To stream data directly from Amazon S3 to the container with no code changes and to provide file system access to the data, choose InputMode.FAST_FILE if an algorithm supports it.

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.

Publish

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

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

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,
})

Use the Parameters field to create a collection of key-value pairs that are passed as input. The values of each can either be static values that you include in your state machine definition, or selected from either the input or the context object with a path.

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

tasks.NewStepFunctionsInvokeActivity(this, jsii.String("Submit Job"), &StepFunctionsInvokeActivityProps{
	Activity: submitJobActivity,
	Parameters: map[string]interface{}{
		"comment": jsii.String("Selecting what I care about."),
		"MyDetails": map[string]interface{}{
			"size": sfn.JsonPath_stringAt(jsii.String("$.product.details.size")),
			"exists": sfn.JsonPath_stringAt(jsii.String("$.product.availability")),
			"StaticValue": jsii.String("foo"),
		},
	},
})

SQS

Step Functions supports Amazon SQS

Send Message

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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` is a construct.
Add a prefix to the stateId of all States found in a construct tree.
Enable guardrail.
Enable guardrail with DRAFT version.
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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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
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
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Creates a new Classification.
Creates a new Classification.
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
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
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
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
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
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
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
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
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
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
No description provided by the author
Initializes the label string.
Initializes the label string.
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
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
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
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
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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
Checks if `x` 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.
gp3 Volume Type.
io1 Volume Type.
sc1 Volume Type.
st1 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.
Lowest-price, which launches instances from the lowest priced pool that has available capacity.
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.
Diversified, which launches instances across all Spot capacity pools.
Lowest-price, which launches instances from the lowest priced pool that has available capacity.
Price-capacity-optimized, which launches instances from Spot Instance pools with the highest capacity availability 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.
The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary.
The standard execution class is ideal for time-sensitive workloads that require fast job startup and dedicated resources.
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.
FastFile mode.
File mode.
Pipe mode.
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.
Encode arrays using brackets.
Encode arrays using commas.
Apply the default URL encoding style (INDICES).
Encode arrays using the index value.
Do not apply URL encoding.
Repeat key for each item in the array.
Each worker maps to 0.25 DPU (2 vCPU, 4 GB of memory, 64 GB disk), and provides 1 executor per worker.
Each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker.
Each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker.
Each worker maps to 4 DPU (16 vCPU, 64 GB of memory, 256 GB disk), and provides 1 executor per worker.
Each worker maps to 8 DPU (32 vCPU, 128 GB of memory, 512 GB disk), and provides 1 executor per worker.
Each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
Each worker maps to 2 high-memory DPU [M-DPU] (8 vCPU, 64 GB of memory, 128 GB disk).

# 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.
Location to retrieve the input data, prior to calling Bedrock InvokeModel.
Location where the Bedrock InvokeModel API response is written.
Properties for invoking a Bedrock Model.
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 across regions.
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 CodeBuildStartBuildBatch.
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.
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 On-Demand and Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior, and allocation strategy.
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 launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
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 Crawler as a task.
Properties for starting an AWS Glue job as a task.
Properties for calling an external HTTP endpoint with HttpInvoke.
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.
Properties for creating a MediaConvert Job.
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.
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.
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.
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 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.
Properties for the worker configuration.

# 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.
A Step Functions Task to invoke a model in Bedrock.
Call HTTP API endpoint as a Task.
Call REST API endpoint as a Task.
A StepFunctions task to call an AWS service API.
A Step Functions task to call an AWS service API across regions.
The classification within a EMR Containers application configuration.
Start a CodeBuild Build as a task.
Start a CodeBuild BatchBuild 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.
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 Crawler in a Task state.
Starts an AWS Glue job in a Task state.
Guradrail settings for BedrockInvokeModel.
A Step Functions Task to call a public third-party API.
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.
Task to train a machine learning model using Amazon SageMaker.
Invoke a Lambda function as a Task.
A Step Functions Task to create a job in MediaConvert.
The Amazon EMR release version to use for the job run.
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 Step Functions Task to publish messages to SNS topic.
A StepFunctions Task to send messages to SQS queue.
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.
On-Demand Allocation Strategies.
AutoScaling Adjustment Type.
Spot Allocation Strategies.
Spot Timeout Actions.
Encryption Options of the S3 bucket.
The excecution class of the job.
Http Methods that API Gateway supports.
Method type of a EKS call.
Input mode that the algorithm supports.
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.
The style used when applying URL encoding to array values.
The type of predefined worker that is allocated when a job runs.