Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mazyu36 committed Jun 30, 2024
1 parent 4603188 commit 17506d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const detectLabels = new tasks.CallAwsService(this, 'DetectLabels', {
### Cross-region AWS API call

You can call AWS API in a different region from your state machine by using the `CallAwsServiceCrossRegion` construct. In addition to the properties for `CallAwsService` construct, you have to set `region` property to call the API.

```ts
declare const myBucket: s3.Bucket;
const getObject = new tasks.CallAwsServiceCrossRegion(this, 'GetObject', {
Expand Down Expand Up @@ -382,7 +382,6 @@ You can apply a guardrail to the invocation by setting `guardrail`.

```ts
import * as bedrock from 'aws-cdk-lib/aws-bedrock';
declare const myGuardrail: bedrock.CfnGuardrail;

const model = bedrock.FoundationModel.fromFoundationModelId(
this,
Expand All @@ -401,10 +400,7 @@ const task = new tasks.BedrockInvokeModel(this, 'Prompt Model with guardrail', {
},
},
),
guardrail: {
guardrailIdentifier: myGuardrail.attrGuardrailId,
guardrailVersion: myGuardrail.attrVersion,
},
guardrail: tasks.Guardrail.enable('guardrailId', 1),
resultSelector: {
names: sfn.JsonPath.stringAt('$.Body.results[0].outputText'),
},
Expand Down

0 comments on commit 17506d6

Please sign in to comment.