Location

class aws_cdk.aws_s3.Location(*, bucket_name, object_key, object_version=None)

Bases: object

An interface that represents the location of a specific object in an S3 Bucket.

Parameters
  • bucket_name (str) – The name of the S3 Bucket the object is in.

  • object_key (str) – The path inside the Bucket where the object is located at.

  • object_version (Optional[str]) – The S3 object version.

Example:

start_query_execution_job = tasks.AthenaStartQueryExecution(self, "Athena Start Query",
    query_string=sfn.JsonPath.string_at("States.Format('select contacts where year={};', $.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

bucket_name

The name of the S3 Bucket the object is in.

Return type

str

object_key

The path inside the Bucket where the object is located at.

Return type

str

object_version

The S3 object version.

Return type

Optional[str]