Skip to content

Commit 4bf0762

Browse files
authored
docs(custom-resources): remove section about experimental SDKv3 support (#26631)
`AwsCustomResource` now uses Node18/SDKv3 by default. This support is no longer experimental, and it does not require passing in different string values into the properties of the custom resource. The V2 strings can be used to interact with the V3 SDK. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a35fcc5 commit 4bf0762

File tree

1 file changed

+1
-33
lines changed
  • packages/aws-cdk-lib/custom-resources

1 file changed

+1
-33
lines changed

packages/aws-cdk-lib/custom-resources/README.md

+1-33
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ Path to data must be specified using a dot notation, e.g. to get the string valu
431431
of the `Title` attribute for the first item returned by `dynamodb.query` it should
432432
be `Items.0.Title.S`.
433433

434-
To make sure that the newest API calls are available the latest AWS SDK v2 is installed
434+
To make sure that the newest API calls are available the latest AWS SDK v3 is installed
435435
in the Lambda function implementing the custom resource. The installation takes around 60
436436
seconds. If you prefer to optimize for speed, you can disable the installation by setting
437437
the `installLatestAwsSdk` prop to `false`.
@@ -648,35 +648,3 @@ const getParameter = new cr.AwsCustomResource(this, 'AssociateVPCWithHostedZone'
648648
}),
649649
});
650650
```
651-
652-
#### Using AWS SDK for JavaScript v3
653-
654-
`AwsCustomResource` experimentally supports AWS SDK for JavaScript v3 (NODEJS_18_X or higher). In AWS SDK for JavaScript v3, packages are installed for each service. Therefore, specify the package name for `service`. Also, `action` specifies the XxxClient operations provided in the package. This example is the same as `SSM.getParameter` in v2.
655-
656-
```ts
657-
import * as regionInfo from 'aws-cdk-lib/region-info';
658-
659-
class MyFact implements regionInfo.IFact {
660-
public readonly region = 'us-east-1';
661-
public readonly name = regionInfo.FactName.DEFAULT_CR_NODE_VERSION;
662-
public readonly value = lambda.Runtime.NODEJS_18_X.name;
663-
}
664-
665-
// change custom resource default runtime
666-
regionInfo.Fact.register(new MyFact(), true);
667-
668-
new cr.AwsCustomResource(this, 'GetParameter', {
669-
resourceType: 'Custom::SSMParameter',
670-
onUpdate: {
671-
service: '@aws-sdk/client-ssm', // 'SSM' in v2
672-
action: 'GetParameterCommand', // 'getParameter' in v2
673-
parameters: {
674-
Name: 'foo',
675-
WithDecryption: true,
676-
},
677-
physicalResourceId: cr.PhysicalResourceId.fromResponse('Parameter.ARN'),
678-
},
679-
});
680-
```
681-
682-
If you are using `NODEJS_18_X` or higher, you can also use the existing AWS SDK for JavaScript v2 style.

0 commit comments

Comments
 (0)