Skip to content
v2.275.0

BedrockInvokeModelInputProps Struct ​

Location to retrieve the input data, prior to calling Bedrock InvokeModel.

Example ​

ts

import * as bedrock from 'aws-cdk-lib/aws-bedrock';

const model = bedrock.FoundationModel.fromFoundationModelId(
  this,
  'Model',
  bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1,
);

const task = new tasks.BedrockInvokeModel(this, 'Prompt Model', {
  model,
  input : { s3InputUri: sfn.JsonPath.stringAt('$.prompt') },
  output: { s3OutputUri: sfn.JsonPath.stringAt('$.prompt') },
});

Properties ​

s3InputUrioptionalstrings3_input_urioptionalstrs3InputUrioptionalStringS3InputUrioptionalstringS3InputUrioptional*string#
The source location where the API response is written.

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

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

s3LocationoptionalLocations3_locationoptionalLocations3LocationoptionalLocationS3LocationoptionalLocationS3LocationoptionalLocation#
S3 object to retrieve the input data from.

Default: Input data is retrieved from the body field

If the S3 location is not set, then the Body must be set.