From b4d182e6b80bb30136fe67e59a52d7a91338d422 Mon Sep 17 00:00:00 2001 From: Konstantin Vyatkin Date: Fri, 17 Jun 2022 04:56:54 -0700 Subject: [PATCH] Add LayerArn to outputs This will allow to easily import this layer into other templates or CDK applications: ```ts const canvasLayer = new CfnApplication(this, 'NodeCanvasLayer", { location: { applicationId: "arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs", semanticVersion: "2.9.1" } } const nodeCanvasLayerVersion = LayerVersion.fromLayerVersionArn( this, "NodeCanvasLayerVersion", canvasLayer.getAtt("Outputs.LayerVersion").toString() ``` --- package-sam.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package-sam.yml b/package-sam.yml index 6f7b066..6e7809b 100644 --- a/package-sam.yml +++ b/package-sam.yml @@ -11,4 +11,8 @@ Resources: - nodejs RetentionPolicy: Retain LicenseInfo: MIT - \ No newline at end of file + +Outputs: + LayerVersion: + Description: Layer ARN Reference + Value: !Ref NodeCanvasLayer