From b73b228f463300813839d9134d077b31bce9e6d7 Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Wed, 8 May 2024 10:56:52 +1000 Subject: [PATCH] Use 'currentVersion' for lambda object to resolve the cdk nag issue Related issue: https://github.com/aws/aws-cdk/issues/20177 --- .../deploy/constructs/cttsov2-icav2-manager/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/workload/stateless/stacks/cttso-v2-pipeline-manager/deploy/constructs/cttsov2-icav2-manager/index.ts b/lib/workload/stateless/stacks/cttso-v2-pipeline-manager/deploy/constructs/cttsov2-icav2-manager/index.ts index 7f05e618d..0a346d24b 100644 --- a/lib/workload/stateless/stacks/cttso-v2-pipeline-manager/deploy/constructs/cttsov2-icav2-manager/index.ts +++ b/lib/workload/stateless/stacks/cttso-v2-pipeline-manager/deploy/constructs/cttsov2-icav2-manager/index.ts @@ -194,7 +194,7 @@ export class Cttsov2Icav2PipelineManagerConstruct extends Construct { generate_trimmed_samplesheet_lambda_obj, upload_samplesheet_to_cache_dir_lambda_obj, ].forEach((lambda_obj) => { - lambda_obj.grantInvoke(stateMachine.role); + lambda_obj.currentVersion.grantInvoke(stateMachine.role); }); // Allow state machine to read/write to dynamodb table