Skip to content

Instantly share code, notes, and snippets.

@nake89
Created August 7, 2021 07:16
Show Gist options
  • Save nake89/7861ab5e41ea7b1afabb87e05ea611cd to your computer and use it in GitHub Desktop.
Save nake89/7861ab5e41ea7b1afabb87e05ea611cd to your computer and use it in GitHub Desktop.
Neat way to get aws api gateway lambda url and put it in serverless.yaml to store it as an environment variable on the lambda function
# Neat way to get aws api gateway lambda url and put it in serverless.yaml to store it as an environment variable on the lambda function:
provider:
name: aws
runtime: nodejs12.x
stage: ${env:STAGE}
region: ${env:REGION}
environment:
CI_URL:
{
"Fn::Join":
[
"",
[
" https://",
{ "Ref": "ApiGatewayRestApi" },
".execute-api.${self:provider.region}.amazonaws.com/${self:provider.stage}/",
],
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment