ResultConfiguration

class aws_cdk.aws_stepfunctions_tasks.ResultConfiguration(*, encryption_configuration=None, output_location=None)

Bases: object

Location of query result along with S3 bucket configuration.

Parameters
  • encryption_configuration (Union[EncryptionConfiguration, Dict[str, Any], None]) – Encryption option used if enabled in S3. Default: - SSE_S3 encrpytion is enabled with default encryption key

  • output_location (Union[Location, Dict[str, Any], None]) – S3 path of query results. Example value: s3://query-results-bucket/folder/ Default: - Query Result Location set in Athena settings for this workgroup

See

https://docs.aws.amazon.com/athena/latest/APIReference/API_ResultConfiguration.html

ExampleMetadata

infused

Example:

start_query_execution_job = tasks.AthenaStartQueryExecution(self, "Athena Start Query",
    query_string=sfn.JsonPath.format("select contacts where year={};", sfn.JsonPath.string_at("$.year")),
    query_execution_context=tasks.QueryExecutionContext(
        database_name="interactions"
    ),
    result_configuration=tasks.ResultConfiguration(
        encryption_configuration=tasks.EncryptionConfiguration(
            encryption_option=tasks.EncryptionOption.S3_MANAGED
        ),
        output_location=s3.Location(
            bucket_name="mybucket",
            object_key="myprefix"
        )
    ),
    integration_pattern=sfn.IntegrationPattern.RUN_JOB
)

Attributes

encryption_configuration

Encryption option used if enabled in S3.

Default
  • SSE_S3 encrpytion is enabled with default encryption key

Return type

Optional[EncryptionConfiguration]

output_location

S3 path of query results.

Example value: s3://query-results-bucket/folder/

Default
  • Query Result Location set in Athena settings for this workgroup

Return type

Optional[Location]