InvokeModel

InvokeModel

Certified

Invoke an Amazon Bedrock foundation model

yaml
type: io.kestra.plugin.aws.bedrock.InvokeModel
yaml
id: bedrock_invoke_model
namespace: company.team

inputs:
  - id: prompt
    type: STRING
    defaults: "Summarize the key benefits of Apache Kafka in 3 bullet points."

tasks:
  - id: invoke_titan
    type: io.kestra.plugin.aws.bedrock.InvokeModel
    region: "{{ secret('AWS_REGION') }}"
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_ACCESS_KEY') }}"
    modelId: "amazon.titan-text-express-v1"
    body:
      inputText: "{{ inputs.prompt }}"
      textGenerationConfig:
        maxTokenCount: 512
        temperature: 0.7

  - id: log_response
    type: io.kestra.plugin.core.log.Log
    message: "{{ outputs.invoke_titan.body }}"
Properties
DefaultPT15M