Skip to content

Commit

Permalink
one more ex
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizencc committed Jul 13, 2023
1 parent 2effe35 commit ff403d7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/aws-synthetics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# AWS::Synthetics Construct Library


This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

```ts nofixture
Expand Down
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/aws-wafv2/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# AWS::WAFv2 Construct Library


This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

```ts nofixture
Expand Down
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/aws-workspaces/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Amazon WorkSpaces Construct Library


This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

```ts nofixture
Expand Down
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/aws-xray/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# AWS::XRay Construct Library


This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

```ts nofixture
Expand Down
14 changes: 7 additions & 7 deletions packages/aws-cdk-lib/custom-resources/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# AWS CDK Custom Resources

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

## Provider Framework

Expand Down Expand Up @@ -344,7 +345,10 @@ This sample demonstrates the following concepts:

#### S3Assert

Checks that the textual contents of an S3 object matches a certain value. The check will be retried for 5 minutes as long as the object is not found or the value is different. See the source code for the [construct](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert.ts) and [handler](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert-handler/index.py).
Checks that the textual contents of an S3 object matches a certain value. The check will be retried
for 5 minutes as long as the object is not found or the value is different. See the source code for the
[construct](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert.ts)
and [handler](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert-handler/index.py).

The following example defines an `S3Assert` resource which waits until
`myfile.txt` in `myBucket` exists and includes the contents `foo bar`:
Expand Down Expand Up @@ -384,7 +388,6 @@ const myProvider = new cr.Provider(this, 'MyProvider', {
role: myRole,
providerFunctionName: 'the-lambda-name', // Optional
});

```

### Customizing Provider Function environment encryption key
Expand All @@ -393,6 +396,8 @@ Sometimes it may be useful to manually set a AWS KMS key for the Provider Functi
be able to view, manage and audit the key usage.

```ts
import * as kms from 'aws-cdk-lib/aws-kms';

declare const onEvent: lambda.Function;
declare const isComplete: lambda.Function;
declare const myRole: iam.Role;
Expand All @@ -405,7 +410,6 @@ const myProvider = new cr.Provider(this, 'MyProvider', {
role: myRole,
providerFunctionEnvEncryption: key, // Optional
});

```

## Custom Resources for AWS APIs
Expand Down Expand Up @@ -676,7 +680,3 @@ new cr.AwsCustomResource(this, 'GetParameter', {
```

If you are using `NODEJS_18_X` or higher, you can also use the existing AWS SDK for JavaScript v2 style.

---

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

0 comments on commit ff403d7

Please sign in to comment.