Skip to content

Commit d07deec

Browse files
authored
fix(opensearchservice): OpenSearchAccessPolicy unnecessarily attempts to install latest sdk version (#28688)
This introduced uncertainty into the resource behavior, adds at least 60s to the execution time and will cause deployments in CN regions to fail. No tests add because the existing tests run with the `@aws-cdk/customresources:installLatestAwsSdkDefault` feature flag set to the recommended value. This change is merely change the `OpenSearchAccessPolicy` config for users that don't set the feature flag. We can safely do this, because we control the code for this custom resource and know it works with the provided SDK version. Related to #27597 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8fbd385 commit d07deec

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/aws-cdk-lib/aws-elasticsearch/lib/elasticsearch-access-policy.ts

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class ElasticsearchAccessPolicy extends cr.AwsCustomResource {
3333
constructor(scope: Construct, id: string, props: ElasticsearchAccessPolicyProps) {
3434
super(scope, id, {
3535
resourceType: 'Custom::ElasticsearchAccessPolicy',
36+
installLatestAwsSdk: false,
3637
onUpdate: {
3738
action: 'updateElasticsearchDomainConfig',
3839
service: 'ES',

packages/aws-cdk-lib/aws-opensearchservice/lib/opensearch-access-policy.ts

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class OpenSearchAccessPolicy extends cr.AwsCustomResource {
3333
constructor(scope: Construct, id: string, props: OpenSearchAccessPolicyProps) {
3434
super(scope, id, {
3535
resourceType: 'Custom::OpenSearchAccessPolicy',
36+
installLatestAwsSdk: false,
3637
onUpdate: {
3738
action: 'updateDomainConfig',
3839
service: 'OpenSearch',

0 commit comments

Comments
 (0)