Skip to content

Commit

Permalink
fixed README
Browse files Browse the repository at this point in the history
  • Loading branch information
lpizzinidev committed Oct 20, 2023
1 parent c655f1f commit 470ae81
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/@aws-cdk/aws-scheduler-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,19 @@ If you wish you can also provide a customer managed key to encrypt and decrypt t
Target classes will automatically add AWS KMS Decrypt permission to your schedule's execution role permissions policy.

```ts
import * as kms from '@aws-cdk/aws-kms';
declare const key: kms.Key;
declare const fn: lambda.Function;

declare const encryptionKey: kms.Key;
const target = new targets.LambdaInvoke(fn, {
input: ScheduleTargetInput.fromObject({
"payload": "useful",
}),
});

const schedule = new Schedule(this, 'Schedule', {
scheduleExpression: ScheduleExpression.rate(Duration.minutes(10)),
schedule: ScheduleExpression.rate(Duration.minutes(10)),
target,
key: encryptionKey,
key,
});
```

Expand Down

0 comments on commit 470ae81

Please sign in to comment.