Skip to content

Commit

Permalink
fix(redshift-alpha): incorrect CR runtime version (aws#26406)
Browse files Browse the repository at this point in the history
Fixes the database-query custom resource in redshift alpha to correctly use Node18 as the runtime version since it now uses sdk v3.

Fixes: aws#26397

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
MrArnoldPalmer authored and bmoffatt committed Jul 28, 2023
1 parent ddcb9bf commit 6d7b692
Show file tree
Hide file tree
Showing 9 changed files with 325 additions and 592 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Construct } from 'constructs';
import { DatabaseQueryHandlerProps } from './handler-props';
import { Cluster } from '../cluster';
import { DatabaseOptions } from '../database-options';
import { builtInCustomResourceNodeRuntime } from 'aws-cdk-lib/custom-resources';

export interface DatabaseQueryProps<HandlerProps> extends DatabaseOptions {
readonly handler: string;
Expand All @@ -35,7 +34,7 @@ export class DatabaseQuery<HandlerProps> extends Construct implements iam.IGrant
code: lambda.Code.fromAsset(path.join(__dirname, 'database-query-provider'), {
exclude: ['*.ts'],
}),
runtime: builtInCustomResourceNodeRuntime(this),
runtime: lambda.Runtime.NODEJS_18_X,
handler: 'index.handler',
timeout: cdk.Duration.minutes(1),
uuid: '3de5bea7-27da-4796-8662-5efb56431b5f',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
}
}
},
"693ec571fbb940cd06ab4a60631c0dfa9781d609f7a43e1158d2a947b1ea9789": {
"58d7225c544c926222bb05c702241fafc73493fc230235bf263756b6ceaeabae": {
"source": {
"path": "aws-cdk-redshift-cluster-database.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "693ec571fbb940cd06ab4a60631c0dfa9781d609f7a43e1158d2a947b1ea9789.json",
"objectKey": "58d7225c544c926222bb05c702241fafc73493fc230235bf263756b6ceaeabae.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Loading

0 comments on commit 6d7b692

Please sign in to comment.