BedrockInvokeModelOutputProps

class aws_cdk.aws_stepfunctions_tasks.BedrockInvokeModelOutputProps(*, s3_location=None, s3_output_uri=None)

Bases: object

Location where the Bedrock InvokeModel API response is written.

Parameters:
  • s3_location (Union[Location, Dict[str, Any], None]) – S3 object where the Bedrock InvokeModel API response is written. If you specify this field, the API response body is replaced with a reference to the Amazon S3 location of the original output. Default: - Response body is returned in the task result

  • s3_output_uri (Optional[str]) – The destination location where the API response is written. This field can be used to specify s3 URI in the form of token Default: - The API response body is returned in the result.

See:

https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html

ExampleMetadata:

infused

Example:

import aws_cdk.aws_bedrock as bedrock


model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)

task = tasks.BedrockInvokeModel(self, "Prompt Model",
    model=model,
    input=tasks.BedrockInvokeModelInputProps(s3_input_uri=sfn.JsonPath.string_at("$.prompt")),
    output=tasks.BedrockInvokeModelOutputProps(s3_output_uri=sfn.JsonPath.string_at("$.prompt"))
)

Attributes

s3_location

S3 object where the Bedrock InvokeModel API response is written.

If you specify this field, the API response body is replaced with a reference to the Amazon S3 location of the original output.

Default:
  • Response body is returned in the task result

s3_output_uri

The destination location where the API response is written.

This field can be used to specify s3 URI in the form of token

Default:
  • The API response body is returned in the result.