From fa0215c5f297062c088b357078627db0e2e69176 Mon Sep 17 00:00:00 2001 From: Alex Melnyk Date: Wed, 26 Aug 2020 08:39:25 +0200 Subject: [PATCH 1/3] improved docs with cli command to fetch available layer versions from SAR --- docs/content/index.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/index.mdx b/docs/content/index.mdx index 26ab367ba4c..f7e3e5d95e8 100644 --- a/docs/content/index.mdx +++ b/docs/content/index.mdx @@ -44,6 +44,12 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, SemanticVersion: 1.3.1 # change to latest semantic version available in SAR ``` +You can fetch the available versions via the API with: + +```bash +aws serverlessrepo list-application-versions --application-id arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer +``` + ## Features Utility | Description From 77f9b9ddc1881165aac42402e6ba62b6131df281 Mon Sep 17 00:00:00 2001 From: Alex Melnyk Date: Wed, 26 Aug 2020 17:43:58 +0200 Subject: [PATCH 2/3] add section where to find the Layer ARN --- docs/content/index.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/content/index.mdx b/docs/content/index.mdx index f7e3e5d95e8..8752ecf8a25 100644 --- a/docs/content/index.mdx +++ b/docs/content/index.mdx @@ -44,6 +44,10 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, SemanticVersion: 1.3.1 # change to latest semantic version available in SAR ``` +This will add a nested app stack with an output parameter `LayerVersionArn`. You can not reference layer arn within the template on the first try, this is currently not supported. +Either first run `sam deploy` and add `Layers` ARN property to the Lambda function after the deployment and run `sam deploy again`. +Or extract the `AWS::Serverless::Application` resource into a separate stack and use `Fn::ImportValue` to fetch the value. + You can fetch the available versions via the API with: ```bash From d16c7bf3a8e13beea588c5353f24da8eb8f0faa4 Mon Sep 17 00:00:00 2001 From: Alex Melnyk Date: Wed, 26 Aug 2020 17:45:53 +0200 Subject: [PATCH 3/3] fix inline formatting --- docs/content/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/index.mdx b/docs/content/index.mdx index 8752ecf8a25..c1cd9f43404 100644 --- a/docs/content/index.mdx +++ b/docs/content/index.mdx @@ -45,7 +45,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, ``` This will add a nested app stack with an output parameter `LayerVersionArn`. You can not reference layer arn within the template on the first try, this is currently not supported. -Either first run `sam deploy` and add `Layers` ARN property to the Lambda function after the deployment and run `sam deploy again`. +Either first run `sam deploy` and add `Layers` ARN property to the Lambda function after the deployment and run `sam deploy` again. Or extract the `AWS::Serverless::Application` resource into a separate stack and use `Fn::ImportValue` to fetch the value. You can fetch the available versions via the API with: