Skip to content
v2.273.0

ResultWriter Class ​

Configuration for writing Distributed Map state results to S3.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const bucket: s3.Bucket;
const resultWriter = new stepfunctions.ResultWriter({
  bucket: bucket,

  // the properties below are optional
  prefix: 'prefix',
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3
from aws_cdk import aws_stepfunctions as stepfunctions

# bucket: s3.Bucket

result_writer = stepfunctions.ResultWriter(
    bucket=bucket,

    # the properties below are optional
    prefix="prefix"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;
import software.amazon.awscdk.services.stepfunctions.*;

Bucket bucket;

ResultWriter resultWriter = ResultWriter.Builder.create()
        .bucket(bucket)

        // the properties below are optional
        .prefix("prefix")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.StepFunctions;

Bucket bucket;

var resultWriter = new ResultWriter(new ResultWriterProps {
    Bucket = bucket,

    // the properties below are optional
    Prefix = "prefix"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket Bucket

resultWriter := awscdk.Aws_stepfunctions.NewResultWriter(&ResultWriterProps{
	Bucket: bucket,

	// the properties below are optional
	Prefix: jsii.String("prefix"),
})

Initializer ​

ts
new ResultWriter(props: ResultWriterProps)
python
ResultWriter(props: ResultWriterProps)
java
new ResultWriter(ResultWriterProps props)
csharp
new ResultWriter(ResultWriterProps props)
go
NewResultWriter(Props ResultWriterProps)

Properties ​

bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucketrequired#
S3 Bucket in which to save Map Run results.
prefixstringprefixstrprefixStringPrefixstringPrefix*string= No prefix#
S3 prefix in which to save Map Run results.

Methods ​

providePolicyStatements(): PolicyStatement[]def provide_policy_statements(self, ) -> typing.List[PolicyStatement]public List<PolicyStatement> providePolicyStatements()public PolicyStatement[] ProvidePolicyStatements()func ProvidePolicyStatements() *[]PolicyStatement#
Compile policy statements to provide relevent permissions to the state machine.
render(queryLanguage?: QueryLanguage): anydef render(self, query_language: typing.Optional[QueryLanguage] = None) -> Anypublic Object render(QueryLanguage queryLanguage)public object Render(QueryLanguage? queryLanguage = null)func Render(QueryLanguage QueryLanguage) interface{}#
Render ResultWriter in ASL JSON format.